Struct BitVec Copy item path Source pub struct BitVec<const N: u64 >();Expand description A fixed-size bit vector type.
BitVec<N> is a specification-friendly, fixed-length bit vector that internally
stores an array of Bit values, where each Bit represents a single binary digit (0 or 1).
This type provides several utility methods for constructing and converting bit vectors:
The Debug implementation for BitVec pretty-prints the bits in groups of eight,
making the bit pattern more human-readable. The type also implements indexing,
allowing for easy access to individual bits.
Conversion from i32 vectors of size 8to bit vectors of size 256
Conversion from bit vectors of size 256 to i32 vectors of size 8
Conversion from i64 vectors of size 4to bit vectors of size 256
Conversion from bit vectors of size 256 to i64 vectors of size 4
Conversion from i16 vectors of size 16to bit vectors of size 256
Conversion from bit vectors of size 256 to i16 vectors of size 16
Conversion from i128 vectors of size 2to bit vectors of size 256
Conversion from bit vectors of size 256 to i128 vectors of size 2
Conversion from i8 vectors of size 32to bit vectors of size 256
Conversion from bit vectors of size 256 to i8 vectors of size 32
Conversion from u32 vectors of size 8to bit vectors of size 256
Conversion from bit vectors of size 256 to u32 vectors of size 8
Conversion from u64 vectors of size 4to bit vectors of size 256
Conversion from bit vectors of size 256 to u64 vectors of size 4
Conversion from u16 vectors of size 16to bit vectors of size 256
Conversion from bit vectors of size 256 to u16 vectors of size 16
Conversion from i32 vectors of size 4to bit vectors of size 128
Conversion from bit vectors of size 128 to i32 vectors of size 4
Conversion from i64 vectors of size 2to bit vectors of size 128
Conversion from bit vectors of size 128 to i64 vectors of size 2
Conversion from i16 vectors of size 8to bit vectors of size 128
Conversion from bit vectors of size 128 to i16 vectors of size 8
Conversion from i128 vectors of size 1to bit vectors of size 128
Conversion from bit vectors of size 128 to i128 vectors of size 1
Conversion from i8 vectors of size 16to bit vectors of size 128
Conversion from bit vectors of size 128 to i8 vectors of size 16
Conversion from u32 vectors of size 4to bit vectors of size 128
Conversion from bit vectors of size 128 to u32 vectors of size 4
Conversion from u64 vectors of size 2to bit vectors of size 128
Conversion from bit vectors of size 128 to u64 vectors of size 2
Conversion from u16 vectors of size 8to bit vectors of size 128
Conversion from bit vectors of size 128 to u16 vectors of size 8
Constructor for BitVec. BitVec::<N>::from_fn constructs a bitvector out of a function that takes usizes smaller than N and produces bits.
Convert a slice of machine integers where only the d least significant bits are relevant.
Construct a BitVec out of a machine integer.
Convert a BitVec into a machine integer of type T.
Convert a BitVec into a vector of machine integers of type T.
Generate a random BitVec.
Folds over the array, accumulating a result.
§ Arguments
init - The initial value of the accumulator.
f - A function combining the accumulator and each element.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The returned type after indexing.
Performs the indexing (
container[index]) operation.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.