diff --git a/boolean-bitfield/src/lib.rs b/boolean-bitfield/src/lib.rs index 8328e6350..01e8f9f79 100644 --- a/boolean-bitfield/src/lib.rs +++ b/boolean-bitfield/src/lib.rs @@ -117,6 +117,11 @@ impl BooleanBitfield { 0 } + /// Get the byte at a position, assuming big-endian encoding. + pub fn get_byte(&self, n: usize) -> Option<&u8> { + self.vec.get(n) + } + /// Clone and return the underlying byte array (`Vec`). pub fn to_be_vec(&self) -> Vec { let mut o = self.vec.clone();