pub struct BitvectorArray<const I: u32, const W: u32> { /* private fields */ }Expand description
Power-of-two array of bitvectors without signedness information.
The exponent of array size (index width) is specified in the first generic parameter I. Element width is specified in the second generic parameter L.
The array is indexed by bitvectors of width I, so no out-of-bound access can occur.
Implementations§
Source§impl<const I: u32, const W: u32> BitvectorArray<I, W>
impl<const I: u32, const W: u32> BitvectorArray<I, W>
Sourcepub fn new_filled(element: Bitvector<W>) -> Self
pub fn new_filled(element: Bitvector<W>) -> Self
Creates a new array filled with the given element.
Sourcepub fn from_slice(slice: &[Bitvector<W>]) -> Self
pub fn from_slice(slice: &[Bitvector<W>]) -> Self
Creates the bitvector array from a correctly sized slice of bitvectors.
Panics if the bitvector slice width is not equal to 2L.
Cannot be used within the machine_description macro.
Trait Implementations§
Source§impl<const I: u32, const W: u32> Clone for BitvectorArray<I, W>
impl<const I: u32, const W: u32> Clone for BitvectorArray<I, W>
Source§fn clone(&self) -> BitvectorArray<I, W>
fn clone(&self) -> BitvectorArray<I, W>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const I: u32, const W: u32> IntoMck for BitvectorArray<I, W>
impl<const I: u32, const W: u32> IntoMck for BitvectorArray<I, W>
impl<const I: u32, const W: u32> Eq for BitvectorArray<I, W>
impl<const I: u32, const W: u32> StructuralPartialEq for BitvectorArray<I, W>
Auto Trait Implementations§
impl<const I: u32, const W: u32> Freeze for BitvectorArray<I, W>
impl<const I: u32, const W: u32> RefUnwindSafe for BitvectorArray<I, W>
impl<const I: u32, const W: u32> Send for BitvectorArray<I, W>
impl<const I: u32, const W: u32> Sync for BitvectorArray<I, W>
impl<const I: u32, const W: u32> Unpin for BitvectorArray<I, W>
impl<const I: u32, const W: u32> UnwindSafe for BitvectorArray<I, W>
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