pub struct BitVec<B = Vec<usize>> { /* private fields */ }Expand description
A bit vector.
Implementations§
Source§impl<B> BitVec<B>
impl<B> BitVec<B>
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of bits in the bit vector.
This method is equivalent to BitLength::len, but it is provided to
reduce ambiguity in method resolution.
Sourcepub unsafe fn from_raw_parts(bits: B, len: usize) -> Self
pub unsafe fn from_raw_parts(bits: B, len: usize) -> Self
§Safety
len must be between 0 (included) the number of
bits in bits (included).
pub fn into_raw_parts(self) -> (B, usize)
Source§impl<B: AsRef<[usize]>> BitVec<B>
impl<B: AsRef<[usize]>> BitVec<B>
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> bool
pub unsafe fn get_unchecked(&self, index: usize) -> bool
Returns true if the bit of given index is set, without bound checks.
§Safety
index must be between 0 (included) and BitVec::len (excluded).
Source§impl<B: AsRef<[usize]> + AsMut<[usize]>> BitVec<B>
impl<B: AsRef<[usize]> + AsMut<[usize]>> BitVec<B>
pub fn set(&mut self, index: usize, value: bool)
Sourcepub unsafe fn set_unchecked(&mut self, index: usize, value: bool)
pub unsafe fn set_unchecked(&mut self, index: usize, value: bool)
§Safety
index must be between 0 (included) and BitVec::len (excluded).
Sourcepub fn par_fill(&mut self, value: bool)
pub fn par_fill(&mut self, value: bool)
Sets all bits to the given value using a parallel implementation.
Sourcepub fn par_count_ones(&self) -> usize
pub fn par_count_ones(&self) -> usize
A parallel version of BitVec::count_ones.
Source§impl BitVec<Vec<usize>>
impl BitVec<Vec<usize>>
Sourcepub fn with_value(len: usize, value: bool) -> Self
pub fn with_value(len: usize, value: bool) -> Self
Creates a new bit vector of length len initialized to value.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new zero-length bit vector of given capacity.
Note that the capacity will be rounded up to a multiple of the word size.
pub fn capacity(&self) -> usize
pub fn push(&mut self, b: bool)
pub fn pop(&mut self) -> Option<bool>
pub fn resize(&mut self, new_len: usize, value: bool)
Source§impl<B: AsRef<[usize]>> BitVec<B>
impl<B: AsRef<[usize]>> BitVec<B>
pub fn iter(&self) -> BitIterator<'_, B> ⓘ
pub fn iter_ones(&self) -> OnesIterator<'_, B> ⓘ
pub fn iter_zeros(&self) -> ZerosIterator<'_, B> ⓘ
Trait Implementations§
Source§impl<B> AlignHash for BitVec<B>where
B: AlignHash,
impl<B> AlignHash for BitVec<B>where
B: AlignHash,
Source§fn align_hash(hasher: &mut impl Hasher, _offset_of: &mut usize)
fn align_hash(hasher: &mut impl Hasher, _offset_of: &mut usize)
Accumulate alignment information in
hasher assuming to be positioned
at offset_of.Source§fn align_hash_val(&self, hasher: &mut impl Hasher, offset_of: &mut usize)
fn align_hash_val(&self, hasher: &mut impl Hasher, offset_of: &mut usize)
Call
AlignHash::align_hash on a value.Source§impl<B: AsRef<[usize]>> BitCount for BitVec<B>
impl<B: AsRef<[usize]>> BitCount for BitVec<B>
Source§fn count_ones(&self) -> usize
fn count_ones(&self) -> usize
Returns the number of ones in the underlying bit vector,
with a possibly expensive computation; see
NumBits::num_ones
for constant-time version.Source§fn count_zeros(&self) -> usize
fn count_zeros(&self) -> usize
Returns the number of zeros in the underlying bit vector,
with a possibly expensive computation; see
NumBits::num_zeros
for constant-time version.Source§impl<B> DeserializeInner for BitVec<B>
impl<B> DeserializeInner for BitVec<B>
Source§type DeserType<'epserde_desertype> = BitVec<<B as DeserializeInner>::DeserType<'epserde_desertype>>
type DeserType<'epserde_desertype> = BitVec<<B as DeserializeInner>::DeserType<'epserde_desertype>>
The deserialization type associated with this type. It can be
retrieved conveniently with the alias
DeserType.fn _deserialize_full_inner( backend: &mut impl ReadWithPos, ) -> Result<Self, Error>
fn _deserialize_eps_inner<'deserialize_eps_inner_lifetime>( backend: &mut SliceWithPos<'deserialize_eps_inner_lifetime>, ) -> Result<Self::DeserType<'deserialize_eps_inner_lifetime>, Error>
Source§impl Extend<bool> for BitVec<Vec<usize>>
impl Extend<bool> for BitVec<Vec<usize>>
Source§fn extend<T>(&mut self, i: T)where
T: IntoIterator<Item = bool>,
fn extend<T>(&mut self, i: T)where
T: IntoIterator<Item = bool>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a, W: IntoAtomic> From<AtomicBitVec<&'a [<W as IntoAtomic>::AtomicType]>> for BitVec<&'a [W]>
impl<'a, W: IntoAtomic> From<AtomicBitVec<&'a [<W as IntoAtomic>::AtomicType]>> for BitVec<&'a [W]>
Source§fn from(value: AtomicBitVec<&'a [W::AtomicType]>) -> Self
fn from(value: AtomicBitVec<&'a [W::AtomicType]>) -> Self
Converts to this type from the input type.
Source§impl<'a, W: IntoAtomic> From<AtomicBitVec<&'a mut [<W as IntoAtomic>::AtomicType]>> for BitVec<&'a mut [W]>
impl<'a, W: IntoAtomic> From<AtomicBitVec<&'a mut [<W as IntoAtomic>::AtomicType]>> for BitVec<&'a mut [W]>
Source§fn from(value: AtomicBitVec<&'a mut [W::AtomicType]>) -> Self
fn from(value: AtomicBitVec<&'a mut [W::AtomicType]>) -> Self
Converts to this type from the input type.
Source§impl<W: IntoAtomic> From<AtomicBitVec<Box<[<W as IntoAtomic>::AtomicType]>>> for BitVec<Box<[W]>>
impl<W: IntoAtomic> From<AtomicBitVec<Box<[<W as IntoAtomic>::AtomicType]>>> for BitVec<Box<[W]>>
Source§fn from(value: AtomicBitVec<Box<[W::AtomicType]>>) -> Self
fn from(value: AtomicBitVec<Box<[W::AtomicType]>>) -> Self
Converts to this type from the input type.
Source§impl<W: IntoAtomic> From<AtomicBitVec<Vec<<W as IntoAtomic>::AtomicType>>> for BitVec<Vec<W>>
impl<W: IntoAtomic> From<AtomicBitVec<Vec<<W as IntoAtomic>::AtomicType>>> for BitVec<Vec<W>>
Source§fn from(value: AtomicBitVec<Vec<W::AtomicType>>) -> Self
fn from(value: AtomicBitVec<Vec<W::AtomicType>>) -> Self
Converts to this type from the input type.
Source§impl<'a, W: IntoAtomic> From<BitVec<&'a [W]>> for AtomicBitVec<&'a [W::AtomicType]>
impl<'a, W: IntoAtomic> From<BitVec<&'a [W]>> for AtomicBitVec<&'a [W::AtomicType]>
Source§impl<'a, W: IntoAtomic> From<BitVec<&'a mut [W]>> for AtomicBitVec<&'a mut [W::AtomicType]>
impl<'a, W: IntoAtomic> From<BitVec<&'a mut [W]>> for AtomicBitVec<&'a mut [W::AtomicType]>
Source§impl<W: IntoAtomic> From<BitVec<Box<[W]>>> for AtomicBitVec<Box<[W::AtomicType]>>
impl<W: IntoAtomic> From<BitVec<Box<[W]>>> for AtomicBitVec<Box<[W::AtomicType]>>
Source§impl<W: IntoAtomic> From<BitVec<Vec<W>>> for AtomicBitVec<Vec<W::AtomicType>>
impl<W: IntoAtomic> From<BitVec<Vec<W>>> for AtomicBitVec<Vec<W::AtomicType>>
Source§impl<B> MemDbgImpl for BitVec<B>
impl<B> MemDbgImpl for BitVec<B>
fn _mem_dbg_rec_on( &self, _memdbg_writer: &mut impl Write, _memdbg_total_size: usize, _memdbg_max_depth: usize, _memdbg_prefix: &mut String, _memdbg_is_last: bool, _memdbg_flags: DbgFlags, ) -> Result
fn _mem_dbg_depth_on( &self, writer: &mut impl Write, total_size: usize, max_depth: usize, prefix: &mut String, field_name: Option<&str>, is_last: bool, padded_size: usize, flags: DbgFlags, ) -> Result<(), Error>
Source§impl<B> SerializeInner for BitVec<B>
impl<B> SerializeInner for BitVec<B>
Source§const IS_ZERO_COPY: bool
const IS_ZERO_COPY: bool
Inner constant used by the derive macros to keep
track recursively of whether the type
satisfies the conditions for being zero-copy. It is checked
at runtime against the trait implemented by the type, and
if a
ZeroCopy type has this constant set to false
serialization will panic.Source§const ZERO_COPY_MISMATCH: bool
const ZERO_COPY_MISMATCH: bool
Inner constant used by the derive macros to keep
track of whether all fields of a type are zero-copy
but neither the attribute
#[zero_copy] nor the attribute #[deep_copy]
was specified. It is checked at runtime, and if it is true
a warning will be issued, as the type could be zero-copy,
which would be more efficient.Source§type SerType = BitVec<<B as SerializeInner>::SerType>
type SerType = BitVec<<B as SerializeInner>::SerType>
This is the type that will be written in the header of the file, and
thus the type that will be deserialized. In most cases it is
Self, but
in some cases, as for references to slices,
it is customized.Source§fn _serialize_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>
fn _serialize_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>
Serialize this structure using the given backend.
Source§impl<B> TypeHash for BitVec<B>where
B: TypeHash,
impl<B> TypeHash for BitVec<B>where
B: TypeHash,
Source§fn type_hash_val(&self, hasher: &mut impl Hasher)
fn type_hash_val(&self, hasher: &mut impl Hasher)
Call
TypeHash::type_hash on a value.impl Eq for BitVec<Vec<usize>>
Auto Trait Implementations§
impl<B> Freeze for BitVec<B>where
B: Freeze,
impl<B> RefUnwindSafe for BitVec<B>where
B: RefUnwindSafe,
impl<B> Send for BitVec<B>where
B: Send,
impl<B> Sync for BitVec<B>where
B: Sync,
impl<B> Unpin for BitVec<B>where
B: Unpin,
impl<B> UnwindSafe for BitVec<B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> AtomicBitFieldSlice<u16> for T
impl<T> AtomicBitFieldSlice<u16> for T
Source§unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u16
unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u16
Returns the value at the specified index. Read more
Source§unsafe fn set_atomic_unchecked(&self, index: usize, value: u16, order: Ordering)
unsafe fn set_atomic_unchecked(&self, index: usize, value: u16, order: Ordering)
Sets the element of the slice at the specified index. Read more
Source§fn reset_atomic(&mut self, order: Ordering)
fn reset_atomic(&mut self, order: Ordering)
Sets all values to zero. Read more
Source§fn par_reset_atomic(&mut self, order: Ordering)
fn par_reset_atomic(&mut self, order: Ordering)
Sets all values to zero using a parallel implementation. Read more
Source§impl<T> AtomicBitFieldSlice<u32> for T
impl<T> AtomicBitFieldSlice<u32> for T
Source§unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u32
unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u32
Returns the value at the specified index. Read more
Source§unsafe fn set_atomic_unchecked(&self, index: usize, value: u32, order: Ordering)
unsafe fn set_atomic_unchecked(&self, index: usize, value: u32, order: Ordering)
Sets the element of the slice at the specified index. Read more
Source§fn reset_atomic(&mut self, order: Ordering)
fn reset_atomic(&mut self, order: Ordering)
Sets all values to zero. Read more
Source§fn par_reset_atomic(&mut self, order: Ordering)
fn par_reset_atomic(&mut self, order: Ordering)
Sets all values to zero using a parallel implementation. Read more
Source§impl<T> AtomicBitFieldSlice<u64> for T
impl<T> AtomicBitFieldSlice<u64> for T
Source§unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u64
unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u64
Returns the value at the specified index. Read more
Source§unsafe fn set_atomic_unchecked(&self, index: usize, value: u64, order: Ordering)
unsafe fn set_atomic_unchecked(&self, index: usize, value: u64, order: Ordering)
Sets the element of the slice at the specified index. Read more
Source§fn reset_atomic(&mut self, order: Ordering)
fn reset_atomic(&mut self, order: Ordering)
Sets all values to zero. Read more
Source§fn par_reset_atomic(&mut self, order: Ordering)
fn par_reset_atomic(&mut self, order: Ordering)
Sets all values to zero using a parallel implementation. Read more
Source§impl<T> AtomicBitFieldSlice<u8> for T
impl<T> AtomicBitFieldSlice<u8> for T
Source§unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u8
unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> u8
Returns the value at the specified index. Read more
Source§unsafe fn set_atomic_unchecked(&self, index: usize, value: u8, order: Ordering)
unsafe fn set_atomic_unchecked(&self, index: usize, value: u8, order: Ordering)
Sets the element of the slice at the specified index. Read more
Source§fn reset_atomic(&mut self, order: Ordering)
fn reset_atomic(&mut self, order: Ordering)
Sets all values to zero. Read more
Source§fn par_reset_atomic(&mut self, order: Ordering)
fn par_reset_atomic(&mut self, order: Ordering)
Sets all values to zero using a parallel implementation. Read more
Source§impl<T> AtomicBitFieldSlice<usize> for Twhere
T: AsRef<[AtomicUsize]>,
impl<T> AtomicBitFieldSlice<usize> for Twhere
T: AsRef<[AtomicUsize]>,
Source§unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> usize
unsafe fn get_atomic_unchecked(&self, index: usize, order: Ordering) -> usize
Returns the value at the specified index. Read more
Source§unsafe fn set_atomic_unchecked(
&self,
index: usize,
value: usize,
order: Ordering,
)
unsafe fn set_atomic_unchecked( &self, index: usize, value: usize, order: Ordering, )
Sets the element of the slice at the specified index. Read more
Source§fn reset_atomic(&mut self, order: Ordering)
fn reset_atomic(&mut self, order: Ordering)
Sets all values to zero. Read more
Source§fn par_reset_atomic(&mut self, order: Ordering)
fn par_reset_atomic(&mut self, order: Ordering)
Sets all values to zero using a parallel implementation. Read more
Source§impl<T, W> AtomicHelper<W> for Twhere
W: Word + IntoAtomic,
T: AtomicBitFieldSlice<W>,
<W as IntoAtomic>::AtomicType: AtomicUnsignedInt + AsBytes,
impl<T, W> AtomicHelper<W> for Twhere
W: Word + IntoAtomic,
T: AtomicBitFieldSlice<W>,
<W as IntoAtomic>::AtomicType: AtomicUnsignedInt + AsBytes,
Source§unsafe fn get_unchecked(&self, index: usize, order: Ordering) -> W
unsafe fn get_unchecked(&self, index: usize, order: Ordering) -> W
Delegates to
AtomicBitFieldSlice::get_atomic_unchecked Read moreSource§fn get(&self, index: usize, order: Ordering) -> W
fn get(&self, index: usize, order: Ordering) -> W
Delegates to
AtomicBitFieldSlice::set_atomicSource§unsafe fn set_unchecked(&self, index: usize, value: W, order: Ordering)
unsafe fn set_unchecked(&self, index: usize, value: W, order: Ordering)
Delegates to
AtomicBitFieldSlice::set_atomic_unchecked Read moreSource§fn set(&self, index: usize, value: W, order: Ordering)
fn set(&self, index: usize, value: W, order: Ordering)
Delegates to
AtomicBitFieldSlice::set_atomicSource§fn reset(&mut self, order: Ordering)
fn reset(&mut self, order: Ordering)
Delegates to
AtomicBitFieldSlice::reset_atomicSource§impl<T> BitFieldSlice<u128> for T
impl<T> BitFieldSlice<u128> for T
Source§impl<T> BitFieldSlice<u16> for T
impl<T> BitFieldSlice<u16> for T
Source§impl<T> BitFieldSlice<u32> for T
impl<T> BitFieldSlice<u32> for T
Source§impl<T> BitFieldSlice<u64> for T
impl<T> BitFieldSlice<u64> for T
Source§impl<T> BitFieldSlice<u8> for T
impl<T> BitFieldSlice<u8> for T
Source§impl<T> BitFieldSlice<usize> for T
impl<T> BitFieldSlice<usize> for T
Source§impl<T> BitFieldSliceCore<AtomicU16> for T
impl<T> BitFieldSliceCore<AtomicU16> for T
Source§impl<T> BitFieldSliceCore<AtomicU32> for T
impl<T> BitFieldSliceCore<AtomicU32> for T
Source§impl<T> BitFieldSliceCore<AtomicU64> for T
impl<T> BitFieldSliceCore<AtomicU64> for T
Source§impl<T> BitFieldSliceCore<AtomicU8> for T
impl<T> BitFieldSliceCore<AtomicU8> for T
Source§impl<T> BitFieldSliceCore<AtomicUsize> for Twhere
T: AsRef<[AtomicUsize]>,
impl<T> BitFieldSliceCore<AtomicUsize> for Twhere
T: AsRef<[AtomicUsize]>,
Source§impl<T> BitFieldSliceCore<i128> for T
impl<T> BitFieldSliceCore<i128> for T
Source§impl<T> BitFieldSliceCore<i16> for T
impl<T> BitFieldSliceCore<i16> for T
Source§impl<T> BitFieldSliceCore<i32> for T
impl<T> BitFieldSliceCore<i32> for T
Source§impl<T> BitFieldSliceCore<i64> for T
impl<T> BitFieldSliceCore<i64> for T
Source§impl<T> BitFieldSliceCore<i8> for T
impl<T> BitFieldSliceCore<i8> for T
Source§impl<T> BitFieldSliceCore<isize> for T
impl<T> BitFieldSliceCore<isize> for T
Source§impl<T> BitFieldSliceCore<u128> for T
impl<T> BitFieldSliceCore<u128> for T
Source§impl<T> BitFieldSliceCore<u16> for T
impl<T> BitFieldSliceCore<u16> for T
Source§impl<T> BitFieldSliceCore<u32> for T
impl<T> BitFieldSliceCore<u32> for T
Source§impl<T> BitFieldSliceCore<u64> for T
impl<T> BitFieldSliceCore<u64> for T
Source§impl<T> BitFieldSliceCore<u8> for T
impl<T> BitFieldSliceCore<u8> for T
Source§impl<T> BitFieldSliceCore<usize> for T
impl<T> BitFieldSliceCore<usize> for T
Source§impl<T> BitFieldSliceMut<u128> for T
impl<T> BitFieldSliceMut<u128> for T
type ChunksMut<'a> = ChunksMut<'a, u128> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: u128)
unsafe fn set_unchecked(&mut self, index: usize, value: u128)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<u128>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<u128>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [u128]
fn as_mut_slice(&mut self) -> &mut [u128]
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
Source§impl<T> BitFieldSliceMut<u16> for T
impl<T> BitFieldSliceMut<u16> for T
type ChunksMut<'a> = ChunksMut<'a, u16> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: u16)
unsafe fn set_unchecked(&mut self, index: usize, value: u16)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<u16>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<u16>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [u16]
fn as_mut_slice(&mut self) -> &mut [u16]
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
Source§impl<T> BitFieldSliceMut<u32> for T
impl<T> BitFieldSliceMut<u32> for T
type ChunksMut<'a> = ChunksMut<'a, u32> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: u32)
unsafe fn set_unchecked(&mut self, index: usize, value: u32)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<u32>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<u32>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [u32]
fn as_mut_slice(&mut self) -> &mut [u32]
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
Source§impl<T> BitFieldSliceMut<u64> for T
impl<T> BitFieldSliceMut<u64> for T
type ChunksMut<'a> = ChunksMut<'a, u64> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: u64)
unsafe fn set_unchecked(&mut self, index: usize, value: u64)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<u64>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<u64>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [u64]
fn as_mut_slice(&mut self) -> &mut [u64]
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
Source§impl<T> BitFieldSliceMut<u8> for T
impl<T> BitFieldSliceMut<u8> for T
type ChunksMut<'a> = ChunksMut<'a, u8> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: u8)
unsafe fn set_unchecked(&mut self, index: usize, value: u8)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<u8>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<u8>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
Source§impl<T> BitFieldSliceMut<usize> for T
impl<T> BitFieldSliceMut<usize> for T
type ChunksMut<'a> = ChunksMut<'a, usize> where T: 'a
Source§unsafe fn set_unchecked(&mut self, index: usize, value: usize)
unsafe fn set_unchecked(&mut self, index: usize, value: usize)
Sets the element of the slice at the specified index.
No bounds checking is performed. Read more
Source§fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
fn copy(&self, from: usize, dst: &mut T, to: usize, len: usize)
Copy part of the content of the vector to another vector. Read more
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<<T as BitFieldSliceMut<usize>>::ChunksMut<'_>, ()>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<<T as BitFieldSliceMut<usize>>::ChunksMut<'_>, ()>
Tries and returns an iterator over non-overlapping mutable chunks of a
bit-field slice, starting at the beginning of the slice. Read more
Source§fn as_mut_slice(&mut self) -> &mut [usize]
fn as_mut_slice(&mut self) -> &mut [usize]
Returns the backend of the slice as a mutable slice of
W.Source§fn set(&mut self, index: usize, value: W)
fn set(&mut self, index: usize, value: W)
Sets the element of the slice at the specified index. Read more
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place without
checking bit widths. Read more
Source§fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
fn apply_in_place<F>(&mut self, f: F)where
F: FnMut(W) -> W,
Self: BitFieldSlice<W>,
Applies a function to all elements of the slice in place. Read more
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, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Deserialize for T
impl<T> Deserialize for T
Source§fn deserialize_full(backend: &mut impl ReadNoStd) -> Result<T, Error>
fn deserialize_full(backend: &mut impl ReadNoStd) -> Result<T, Error>
Fully deserialize a structure of this type from the given backend.
Source§fn deserialize_eps(
backend: &[u8],
) -> Result<<T as DeserializeInner>::DeserType<'_>, Error>
fn deserialize_eps( backend: &[u8], ) -> Result<<T as DeserializeInner>::DeserType<'_>, Error>
ε-copy deserialize a structure of this type from the given backend.
Source§fn load_full(path: impl AsRef<Path>) -> Result<Self, Error>
fn load_full(path: impl AsRef<Path>) -> Result<Self, Error>
Convenience method to fully deserialize from a file.
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
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 moreSource§impl<T> MemDbg for Twhere
T: MemDbgImpl,
impl<T> MemDbg for Twhere
T: MemDbgImpl,
Source§fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage, expanding
all levels of nested structures.
Source§fn mem_dbg_on(
&self,
writer: &mut impl Write,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_on( &self, writer: &mut impl Write, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage, expanding all levels of nested structures.Source§fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage as
mem_dbg, but expanding only up to max_depth
levels of nested structures.Source§fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_depth_on( &self, writer: &mut impl Write, max_depth: usize, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage as mem_dbg_on, but expanding only up to
max_depth levels of nested structures.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.