pub enum Bits<const N: usize> {
Short(ShortBitVec<N>),
Long(BitVec<N>),
}
Variants
Short(ShortBitVec<N>)
Long(BitVec<N>)
Implementations
sourceimpl<const N: usize> Bits<N>
impl<const N: usize> Bits<N>
pub fn any(&self) -> bool
pub fn all(&self) -> bool
pub fn xor(&self) -> bool
pub fn index(&self) -> usize
pub fn len(&self) -> usize
pub fn count() -> usize
pub fn get_bit(&self, index: usize) -> bool
pub fn replace_bit(&self, index: usize, val: bool) -> Self
pub fn get_bits<const M: usize>(&self, index: usize) -> Bits<M>
pub fn set_bits<const M: usize>(&mut self, index: usize, rhs: Bits<M>)
pub fn mask() -> Bits<N>
pub const fn width() -> usize
Trait Implementations
sourceimpl Into<Bits<LogicState>> for I2CControllerCmd
impl Into<Bits<LogicState>> for I2CControllerCmd
sourceimpl Into<Bits<LogicState>> for I2CDriverCmd
impl Into<Bits<LogicState>> for I2CDriverCmd
sourceimpl Into<Bits<LogicState>> for SDRAMCommand
impl Into<Bits<LogicState>> for SDRAMCommand
sourceimpl Mul<Bits<16_usize>> for Bits<16>
impl Mul<Bits<16_usize>> for Bits<16>
Multipliers are special, so we only implement multipliers that we think are synthesizable. In this case, we implement a 16 x 16 bit multiplier which yields a 32 bit result.
sourceimpl<const N: usize> Ord for Bits<N>
impl<const N: usize> Ord for Bits<N>
sourceimpl<const N: usize> PartialOrd<Bits<N>> for Bits<N>
impl<const N: usize> PartialOrd<Bits<N>> for Bits<N>
sourcefn partial_cmp(&self, other: &Bits<N>) -> Option<Ordering>
fn partial_cmp(&self, other: &Bits<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<const N: usize> Copy for Bits<N>
impl<const N: usize> Eq for Bits<N>
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for Bits<N>
impl<const N: usize> Send for Bits<N>
impl<const N: usize> Sync for Bits<N>
impl<const N: usize> Unpin for Bits<N>
impl<const N: usize> UnwindSafe for Bits<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.