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