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 From<MIGCommand> for Bits<{ MIGCommand::BITS }>
impl From<MIGCommand> for Bits<{ MIGCommand::BITS }>
sourcefn from(x: MIGCommand) -> Self
fn from(x: MIGCommand) -> Self
Performs the conversion.
sourceimpl From<MaskedWrite> for Bits<{ MaskedWrite::BITS }>
impl From<MaskedWrite> for Bits<{ MaskedWrite::BITS }>
sourcefn from(x: MaskedWrite) -> Self
fn from(x: MaskedWrite) -> Self
Performs the conversion.
sourceimpl Into<Bits<LogicState>> for DDRFIFOState
impl Into<Bits<LogicState>> for DDRFIFOState
sourceimpl Into<Bits<LogicState>> for MIGInstruction
impl Into<Bits<LogicState>> for MIGInstruction
sourceimpl Into<Bits<LogicState>> for DDR7FIFOState
impl Into<Bits<LogicState>> for DDR7FIFOState
sourceimpl Into<Bits<LogicState>> for MIG7SimState
impl Into<Bits<LogicState>> for MIG7SimState
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 Into<Bits<LogicState>> for SyncSenderState
impl Into<Bits<LogicState>> for SyncSenderState
sourceimpl Into<Bits<LogicState>> for SyncReceiverState
impl Into<Bits<LogicState>> for SyncReceiverState
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more