Struct BitString

Source
pub struct BitString(/* private fields */);

Implementations§

Source§

impl BitString

Source

pub fn bits(&self) -> usize

Return the total number of bits of the bitstring

Source

pub fn bits_unused(&self) -> usize

Return the total number of unused bits on the bitstring

Source

pub fn data_bytes(&self) -> &[u8]

Get the data associated with the bitstring as full bytes

Trait Implementations§

Source§

impl AsRef<[u8]> for BitString

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for BitString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for BitString

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for BitString

Source§

fn eq(&self, other: &BitString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for BitString

Source§

impl StructuralPartialEq for BitString

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more