#[repr(u8)]pub enum States {
Two = 0,
Four = 1,
Nine = 2,
}Variants§
Implementations§
Source§impl States
impl States
pub fn from_bit(value: Bit) -> Self
pub fn from_ascii_bit(bit: u8) -> Option<(Self, Bit)>
pub fn from_ascii(string: &[u8]) -> Option<Self>
pub fn from_bits(bits: impl Iterator<Item = Bit>) -> Self
pub fn join(a: Self, b: Self) -> Self
pub fn mask(self) -> u8
Sourcepub fn bits_in_a_byte(self) -> u32
pub fn bits_in_a_byte(self) -> u32
Returns how many signal bits can be encoded in a u8.
Sourcepub fn bytes_required(self, bits: u32) -> usize
pub fn bytes_required(self, bits: u32) -> usize
Returns how many bytes are required to store bits.
Trait Implementations§
impl Copy for States
impl Eq for States
impl StructuralPartialEq for States
Auto Trait Implementations§
impl Freeze for States
impl RefUnwindSafe for States
impl Send for States
impl Sync for States
impl Unpin for States
impl UnsafeUnpin for States
impl UnwindSafe for States
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more