pub struct BitFieldVec<B: Backend = Vec<usize>> { /* private fields */ }Expand description
A vector of bit fields of fixed width (AKA “compact array”, “bit array”, etc.).
See the module documentation for more details.
Implementations§
Source§impl<B: Backend<Word: Word>> BitFieldVec<B>
impl<B: Backend<Word: Word>> BitFieldVec<B>
Sourcepub unsafe fn from_raw_parts(bits: B, bit_width: usize, len: usize) -> Self
pub unsafe fn from_raw_parts(bits: B, bit_width: usize, len: usize) -> Self
Creates a new vector from the given backend, bit width, and length.
§Safety
-
bit_widthcan be at mostBackend::Word::BITS; -
len*bit_widthmust be between 0 (included) and the number of bits inbits(included); -
there must be at least an allocated word when
bit_widthis zero.
Sourcepub fn into_raw_parts(self) -> (B, usize, usize)
pub fn into_raw_parts(self) -> (B, usize, usize)
Returns the backend, the bit width, and the length, consuming this vector.
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the number of values in the vector.
This method is equivalent to SliceByValue::len, but it is provided
for convenience, so that the trait need not be in scope, and to reduce
ambiguity in method resolution.
Sourcepub const fn bit_width(&self) -> usize
pub const fn bit_width(&self) -> usize
Returns the bit width of the values inside the vector.
This method is equivalent to BitWidth::bit_width, but it is
provided for convenience, so that the trait need not be in scope.
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
Sourcepub fn addr_of(&self, index: usize) -> *const B::Word
pub fn addr_of(&self, index: usize) -> *const B::Word
Gets the address of the item storing (the first part of) the element of given index.
This method is mainly useful for manually prefetching parts of the data structure.
Sourcepub fn get_unaligned(&self, index: usize) -> B::Word
pub fn get_unaligned(&self, index: usize) -> B::Word
Like SliceByValue::index_value, but using unaligned reads.
This method can be used only for bit width smaller than or equal to
W::BITS as usize - 8 + 2 or equal to W::BITS as usize - 8 + 4 or W::BITS. Moreover,
an additional padding word must be present at the end of the vector.
Note that to guarantee the absence of undefined behavior this method
has to perform several tests. Consider using
get_unaligned_unchecked if you are sure that the constraints are
respected.
§Panics
This method will panic if the constraints above are not respected.
Sourcepub unsafe fn get_unaligned_unchecked(&self, index: usize) -> B::Word
pub unsafe fn get_unaligned_unchecked(&self, index: usize) -> B::Word
Like SliceByValue::get_value_unchecked, but using unaligned reads.
§Safety
This method can be used only for bit width smaller than or equal to
W::BITS as usize - 8 + 2 or equal to W::BITS as usize - 8 + 4 or W::BITS. Moreover,
an additional padding word must be present at the end of the vector,
and index must be within bounds.
§Panics
This method will panic in debug mode if the safety constraints are not respected.
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
Sourcepub fn wrap(backend: B, bit_width: usize, len: usize) -> BitFieldVec<B>
pub fn wrap(backend: B, bit_width: usize, len: usize) -> BitFieldVec<B>
Wraps a backend as a bit-field vector of given bit width and length.
§Panics
This function will panic if len * bit_width is greater than the number
of bits available in the backend, or if bit_width is zero and len is
nonzero while the backend is empty (a nonzero length always requires at
least one backing word, even at bit width zero).
Source§impl<W: Word> BitFieldVec<Vec<W>>
impl<W: Word> BitFieldVec<Vec<W>>
Sourcepub fn new(bit_width: usize, len: usize) -> Self
pub fn new(bit_width: usize, len: usize) -> Self
Creates a new zero-initialized vector of given bit width and length.
Sourcepub fn with_capacity(bit_width: usize, capacity: usize) -> Self
pub fn with_capacity(bit_width: usize, capacity: usize) -> Self
Creates an empty vector that doesn’t need to reallocate for up to
capacity elements.
Sourcepub unsafe fn set_len(&mut self, len: usize)
pub unsafe fn set_len(&mut self, len: usize)
Sets the length.
§Safety
len * bit_width must be at most self.bits.len() * W::BITS as usize,
and there must be at least an allocated word when the bit width is zero
(vectors built by the constructors of this structure always satisfy
the latter condition). Note that setting the length might result in
reading uninitialized data.
Sourcepub fn from_slice<S: BitFieldSlice<Value: Word + PrimitiveNumberAs<W>>>(
slice: &S,
) -> Result<Self>
pub fn from_slice<S: BitFieldSlice<Value: Word + PrimitiveNumberAs<W>>>( slice: &S, ) -> Result<Self>
Creates a new vector by copying a slice; the bit width will be the minimum width sufficient to hold all values in the slice.
Returns an error if the bit width of the values in slice is larger than
W::BITS.
Sourcepub fn push(&mut self, value: W)
pub fn push(&mut self, value: W)
Adds a value at the end of the vector.
§Panics
If the value does not fit the bit width, or if the length of the
vector overflows usize.
Sourcepub fn pop(&mut self) -> Option<W>
pub fn pop(&mut self) -> Option<W>
Removes and returns a value from the end of the vector.
Returns None if the BitFieldVec is empty.
Sourcepub fn into_padded(self) -> BitFieldVec<Box<[W]>>
pub fn into_padded(self) -> BitFieldVec<Box<[W]>>
Ensures a padding word is present at the end and converts the
backend to Box<[W]>.
The extra word ensures that unaligned reads of size_of::<W>()
bytes starting at any byte offset within the data never exceed the
allocation. If the allocation already has more words than needed
for the data, no word is added.
Source§impl<W: Word> BitFieldVec<Box<[W]>>
impl<W: Word> BitFieldVec<Box<[W]>>
Sourcepub fn new_padded(bit_width: usize, len: usize) -> Self
pub fn new_padded(bit_width: usize, len: usize) -> Self
Creates a new zero-initialized vector of given bit width and length, with a padding word at the end for safe unaligned reads.
This constructor is useful for structures implementing
TryIntoUnaligned that want to avoid reallocations.
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> BitFieldVec<B>
Sourcepub fn copy(&self, from: usize, dst: &mut Self, to: usize, len: usize)
pub fn copy(&self, from: usize, dst: &mut Self, to: usize, len: usize)
Copies part of the content of this vector to another vector of the same type, word by word.
This inherent method takes precedence over SliceByValueMut::copy
for same-type copies and is significantly faster than the element-wise
generic implementation.
§Panics
If the bit widths of the two vectors differ.
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldVec<B>
Sourcepub fn iter_from(&self, from: usize) -> BitFieldVecIter<'_, B> ⓘ
pub fn iter_from(&self, from: usize) -> BitFieldVecIter<'_, B> ⓘ
Returns an iterator over the values of the vector starting from
position from.
Sourcepub fn iter(&self) -> BitFieldVecIter<'_, B> ⓘ
pub fn iter(&self) -> BitFieldVecIter<'_, B> ⓘ
Returns an iterator over the values of the vector.
Trait Implementations§
Source§impl<B> AlignHash for BitFieldVec<B>
Available on crate feature epserde only.
impl<B> AlignHash for BitFieldVec<B>
epserde only.Source§fn align_hash(hasher: &mut impl Hasher, offset_of: &mut usize)
fn align_hash(hasher: &mut impl Hasher, offset_of: &mut usize)
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)
AlignHash::align_hash on a value.Source§impl<B> Backend for BitFieldVec<B>
impl<B> Backend for BitFieldVec<B>
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldSlice for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> BitFieldSlice for BitFieldVec<B>
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> BitFieldSliceMut for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> BitFieldSliceMut for BitFieldVec<B>
Source§impl<B: Backend> CopyType for BitFieldVec<B>
Available on crate feature epserde only.
impl<B: Backend> CopyType for BitFieldVec<B>
epserde only.Source§impl<B> DeserInner for BitFieldVec<B>where
usize: DeserInner,
B::Word: DeserInner,
for<'a> <B as DeserInner>::DeserType<'a>: Backend<Word = B::Word>,
B: DeserInner + Backend,
for<'__ඞඞඞepserdeඞඞඞ_desertype> DeserType<'__ඞඞඞepserdeඞඞඞ_desertype, B>: Backend,
Available on crate feature epserde only.
impl<B> DeserInner for BitFieldVec<B>where
usize: DeserInner,
B::Word: DeserInner,
for<'a> <B as DeserInner>::DeserType<'a>: Backend<Word = B::Word>,
B: DeserInner + Backend,
for<'__ඞඞඞepserdeඞඞඞ_desertype> DeserType<'__ඞඞඞepserdeඞඞඞ_desertype, B>: Backend,
epserde only.Source§type DeserType<'__ඞඞඞepserdeඞඞඞ_desertype> = BitFieldVec<<B as DeserInner>::DeserType<'__ඞඞඞepserdeඞඞඞ_desertype>>
type DeserType<'__ඞඞඞepserdeඞඞඞ_desertype> = BitFieldVec<<B as DeserInner>::DeserType<'__ඞඞඞepserdeඞඞඞ_desertype>>
DeserType.Source§fn __check_covariance<'__long: '__short, '__short>(
proof: CovariantProof<Self::DeserType<'__long>>,
) -> CovariantProof<Self::DeserType<'__short>>
fn __check_covariance<'__long: '__short, '__short>( proof: CovariantProof<Self::DeserType<'__long>>, ) -> CovariantProof<Self::DeserType<'__short>>
Source§unsafe fn _deser_full_inner(
backend: &mut impl ReadWithPos,
) -> Result<Self, Error>
unsafe fn _deser_full_inner( backend: &mut impl ReadWithPos, ) -> Result<Self, Error>
Source§unsafe fn _deser_eps_inner<'deser_eps_inner_lifetime>(
backend: &mut SliceWithPos<'deser_eps_inner_lifetime>,
) -> Result<Self::DeserType<'deser_eps_inner_lifetime>, Error>
unsafe fn _deser_eps_inner<'deser_eps_inner_lifetime>( backend: &mut SliceWithPos<'deser_eps_inner_lifetime>, ) -> Result<Self::DeserType<'deser_eps_inner_lifetime>, Error>
Source§impl<'de, B> Deserialize<'de> for BitFieldVec<B>
Available on crate feature serde only.
impl<'de, B> Deserialize<'de> for BitFieldVec<B>
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> Eq for BitFieldVec<B>
Source§impl<W: Word> Extend<W> for BitFieldVec<Vec<W>>
impl<W: Word> Extend<W> for BitFieldVec<Vec<W>>
Source§fn extend<T: IntoIterator<Item = W>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = W>>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<B> FlatType for BitFieldVec<B>
impl<B> FlatType for BitFieldVec<B>
Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> From<&'a BitFieldVec<B>> for BitFieldVec<&'a [B::Word]>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> From<&'a BitFieldVec<B>> for BitFieldVec<&'a [B::Word]>
Source§fn from(value: &'a BitFieldVec<B>) -> Self
fn from(value: &'a BitFieldVec<B>) -> Self
Source§impl<'a, B: Backend<Word: Word> + AsMut<[B::Word]>> From<&'a mut BitFieldVec<B>> for BitFieldVec<&'a mut [B::Word]>
impl<'a, B: Backend<Word: Word> + AsMut<[B::Word]>> From<&'a mut BitFieldVec<B>> for BitFieldVec<&'a mut [B::Word]>
Source§fn from(value: &'a mut BitFieldVec<B>) -> Self
fn from(value: &'a mut BitFieldVec<B>) -> Self
Source§impl<'a, W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> From<AtomicBitFieldVec<&'a mut [<W as AtomicPrimitive>::Atomic]>> for BitFieldVec<&'a mut [W]>
This conversion is infallible, contrarily to the opposite one, because
the alignment of an atomic type is never less strict than the alignment of
its value type.
impl<'a, W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> From<AtomicBitFieldVec<&'a mut [<W as AtomicPrimitive>::Atomic]>> for BitFieldVec<&'a mut [W]>
This conversion is infallible, contrarily to the opposite one, because the alignment of an atomic type is never less strict than the alignment of its value type.
Source§fn from(value: AtomicBitFieldVec<&'a mut [W::Atomic]>) -> Self
fn from(value: AtomicBitFieldVec<&'a mut [W::Atomic]>) -> Self
Source§impl<W: Word> From<BitFieldVec<Box<[W]>>> for BitFieldVec<Vec<W>>
impl<W: Word> From<BitFieldVec<Box<[W]>>> for BitFieldVec<Vec<W>>
Source§impl<W: Word> From<BitFieldVec<Vec<W>>> for BitFieldVec<Box<[W]>>
impl<W: Word> From<BitFieldVec<Vec<W>>> for BitFieldVec<Box<[W]>>
Source§fn from(value: BitFieldVec<Vec<W>>) -> Self
fn from(value: BitFieldVec<Vec<W>>) -> Self
Source§impl<W: Word> From<BitFieldVecU<Box<[W]>>> for BitFieldVec<Box<[W]>>
impl<W: Word> From<BitFieldVecU<Box<[W]>>> for BitFieldVec<Box<[W]>>
Source§fn from(unaligned: BitFieldVecU<Box<[W]>>) -> Self
fn from(unaligned: BitFieldVecU<Box<[W]>>) -> Self
Converts a BitFieldVecU back into a BitFieldVec.
The padding word is kept in the backing storage so that a
subsequent try_into_unaligned does not need to reallocate.
Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoIterator for &'a BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoIterator for &'a BitFieldVec<B>
Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoIteratorFrom for &'a BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoIteratorFrom for &'a BitFieldVec<B>
Source§type IntoIterFrom = BitFieldVecIter<'a, B>
type IntoIterFrom = BitFieldVecIter<'a, B>
into_iter_from.Source§fn into_iter_from(self, from: usize) -> Self::IntoIterFrom
fn into_iter_from(self, from: usize) -> Self::IntoIterFrom
Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoUncheckedBackIterator for &'a BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoUncheckedBackIterator for &'a BitFieldVec<B>
Source§type IntoUncheckedIterBack = BitFieldVecUncheckedBackIter<'a, B>
type IntoUncheckedIterBack = BitFieldVecUncheckedBackIter<'a, B>
into_unchecked_iter_back and into_unchecked_iter_back_from.Source§fn into_unchecked_iter_back(self) -> Self::IntoUncheckedIterBack
fn into_unchecked_iter_back(self) -> Self::IntoUncheckedIterBack
Source§fn into_unchecked_iter_back_from(
self,
from: usize,
) -> Self::IntoUncheckedIterBack
fn into_unchecked_iter_back_from( self, from: usize, ) -> Self::IntoUncheckedIterBack
from. Read moreSource§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoUncheckedIterator for &'a BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IntoUncheckedIterator for &'a BitFieldVec<B>
Source§type IntoUncheckedIter = BitFieldVecUncheckedIter<'a, B>
type IntoUncheckedIter = BitFieldVecUncheckedIter<'a, B>
into_unchecked_iter and
into_unchecked_iter_from.Source§fn into_unchecked_iter_from(self, from: usize) -> Self::IntoUncheckedIter
fn into_unchecked_iter_from(self, from: usize) -> Self::IntoUncheckedIter
Source§fn into_unchecked_iter(self) -> Self::IntoUncheckedIter
fn into_unchecked_iter(self) -> Self::IntoUncheckedIter
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValue for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValue for BitFieldVec<B>
Source§fn iter_value(&self) -> <Self as IterateByValueGat<'_>>::Iter
fn iter_value(&self) -> <Self as IterateByValueGat<'_>>::Iter
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueFrom for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueFrom for BitFieldVec<B>
Source§fn iter_value_from(&self, from: usize) -> <Self as IterateByValueGat<'_>>::Iter
fn iter_value_from(&self, from: usize) -> <Self as IterateByValueGat<'_>>::Iter
Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueFromGat<'a> for BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueFromGat<'a> for BitFieldVec<B>
Source§type IterFrom = BitFieldVecIter<'a, B>
type IterFrom = BitFieldVecIter<'a, B>
iter_value_from.Source§impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueGat<'a> for BitFieldVec<B>
impl<'a, B: Backend<Word: Word> + AsRef<[B::Word]>> IterateByValueGat<'a> for BitFieldVec<B>
Source§type Iter = BitFieldVecIter<'a, B>
type Iter = BitFieldVecIter<'a, B>
iter_value.Source§impl<B> MemDbgImpl for BitFieldVec<B>where
B: MemDbgImpl + FlatType + Backend,
usize: MemDbgImpl + FlatType,
B::Word: MemDbgImpl + FlatType,
impl<B> MemDbgImpl for BitFieldVec<B>where
B: MemDbgImpl + FlatType + Backend,
usize: MemDbgImpl + FlatType,
B::Word: MemDbgImpl + FlatType,
Source§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,
_memdbg_refs: &mut HashSet<usize>,
) -> Result
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, _memdbg_refs: &mut HashSet<usize>, ) -> Result
self below the current line. Read moreSource§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,
dbg_refs: &mut HashSet<usize>,
) -> Result<(), Error>
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, dbg_refs: &mut HashSet<usize>, ) -> Result<(), Error>
self at the given depth without any reference-address
annotation; forwards to _mem_dbg_depth_on_impl
with RefDisplay::None.Source§fn _mem_dbg_depth_on_impl(
&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,
dbg_refs: &mut HashSet<usize>,
ref_display: RefDisplay,
) -> Result<(), Error>
fn _mem_dbg_depth_on_impl( &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, dbg_refs: &mut HashSet<usize>, ref_display: RefDisplay, ) -> Result<(), Error>
Source§impl<B> MemSize for BitFieldVec<B>
impl<B> MemSize for BitFieldVec<B>
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>, C: Backend<Word = B::Word> + AsRef<[B::Word]>> PartialEq<BitFieldVec<C>> for BitFieldVec<B>
Equality between bit-field vectors requires that the word is the same, the
bit width is the same, and the content is the same.
impl<B: Backend<Word: Word> + AsRef<[B::Word]>, C: Backend<Word = B::Word> + AsRef<[B::Word]>> PartialEq<BitFieldVec<C>> for BitFieldVec<B>
Equality between bit-field vectors requires that the word is the same, the bit width is the same, and the content is the same.
Source§impl SeedStoreBuild for BitFieldVec<Box<[usize]>>
impl SeedStoreBuild for BitFieldVec<Box<[usize]>>
Source§const MAX_BITS: u32 = 16
const MAX_BITS: u32 = 16
Source§impl<B> SerInner for BitFieldVec<B>
Available on crate feature epserde only.
impl<B> SerInner for BitFieldVec<B>
epserde only.Source§const IS_ZERO_COPY: bool = false
const IS_ZERO_COPY: bool = false
ZeroCopy type has this constant set to false serialization will
panic. It is also used by the derive macros to decide whether to suggest
declaring a struct as zero-copy.Source§type SerType = BitFieldVec<<B as SerInner>::SerType>
type SerType = BitFieldVec<<B as SerInner>::SerType>
TypeHash will be written in the header of the
file. It is defined so that this type hash only depends on the
serialization type.Source§unsafe fn _ser_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>
unsafe fn _ser_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>
Source§impl<B> Serialize for BitFieldVec<B>
Available on crate feature serde only.
impl<B> Serialize for BitFieldVec<B>
serde only.Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]>> SliceByValue for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]>> SliceByValue for BitFieldVec<B>
Source§fn len(&self) -> usize
fn len(&self) -> usize
slice::len.Source§unsafe fn get_value_unchecked(&self, index: usize) -> B::Word
unsafe fn get_value_unchecked(&self, index: usize) -> B::Word
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
slice::is_empty.Source§fn index_value(&self, index: usize) -> Self::Value
fn index_value(&self, index: usize) -> Self::Value
Source§impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> SliceByValueMut for BitFieldVec<B>
impl<B: Backend<Word: Word> + AsRef<[B::Word]> + AsMut<[B::Word]>> SliceByValueMut for BitFieldVec<B>
Source§unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)
unsafe fn apply_in_place_unchecked<F>(&mut self, f: F)
This implementation keeps a buffer of W::BITS bits for reading and
writing, obtaining a significant speedup with respect to the default
implementation.
Source§fn try_chunks_mut(
&mut self,
chunk_size: usize,
) -> Result<Self::ChunksMut<'_>, ChunksMutError<B::Word>>
fn try_chunks_mut( &mut self, chunk_size: usize, ) -> Result<Self::ChunksMut<'_>, ChunksMutError<B::Word>>
§Errors
This method returns an error if chunk_size is zero, if
chunk_size * bit_width overflows usize, or if that product is not a
multiple of W::BITS when more than one chunk must be returned.
Note that a zero-width vector yields no chunks, as chunks of a zero-width vector cannot share its backing.
Source§type ChunksMut<'a> = ChunksMut<'a, <B as Backend>::Word>
where
Self: 'a
type ChunksMut<'a> = ChunksMut<'a, <B as Backend>::Word> where Self: 'a
try_chunks_mut.Source§type ChunksMutError = ChunksMutError<<B as Backend>::Word>
type ChunksMutError = ChunksMutError<<B as Backend>::Word>
try_chunks_mut. Read moreSource§fn set_value(&mut self, index: usize, value: B::Word)
fn set_value(&mut self, index: usize, value: B::Word)
Source§fn apply_in_place<F>(&mut self, f: F)
fn apply_in_place<F>(&mut self, f: F)
Source§unsafe fn set_value_unchecked(&mut self, index: usize, value: B::Word)
unsafe fn set_value_unchecked(&mut self, index: usize, value: B::Word)
Source§fn replace_value(&mut self, index: usize, value: B::Word) -> B::Word
fn replace_value(&mut self, index: usize, value: B::Word) -> B::Word
Source§impl<'__subslice_impl, B> SliceByValueSubsliceGat<'__subslice_impl> for BitFieldVec<B>
impl<'__subslice_impl, B> SliceByValueSubsliceGat<'__subslice_impl> for BitFieldVec<B>
Source§type Subslice = BitFieldVecSubsliceImpl<'__subslice_impl, B>
type Subslice = BitFieldVecSubsliceImpl<'__subslice_impl, B>
Source§impl<'__subslice_impl, B> SliceByValueSubsliceGatMut<'__subslice_impl> for BitFieldVec<B>
impl<'__subslice_impl, B> SliceByValueSubsliceGatMut<'__subslice_impl> for BitFieldVec<B>
Source§type SubsliceMut = BitFieldVecSubsliceImplMut<'__subslice_impl, B>
type SubsliceMut = BitFieldVecSubsliceImplMut<'__subslice_impl, B>
Source§impl<B> SliceByValueSubsliceRange<Range<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<Range<usize>> for BitFieldVec<B>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRange<RangeFrom<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<RangeFrom<usize>> for BitFieldVec<B>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRange<RangeFull> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<RangeFull> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked(&self, range: RangeFull) -> Subslice<'_, Self>
unsafe fn get_subslice_unchecked(&self, range: RangeFull) -> Subslice<'_, Self>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRange<RangeInclusive<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<RangeInclusive<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked(
&self,
range: RangeInclusive<usize>,
) -> Subslice<'_, Self>
unsafe fn get_subslice_unchecked( &self, range: RangeInclusive<usize>, ) -> Subslice<'_, Self>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRange<RangeTo<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<RangeTo<usize>> for BitFieldVec<B>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRange<RangeToInclusive<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRange<RangeToInclusive<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked(
&self,
range: RangeToInclusive<usize>,
) -> Subslice<'_, Self>
unsafe fn get_subslice_unchecked( &self, range: RangeToInclusive<usize>, ) -> Subslice<'_, Self>
Source§fn index_subslice(&self, range: R) -> Self::Subslice
fn index_subslice(&self, range: R) -> Self::Subslice
Source§fn get_subslice(&self, range: R) -> Option<Self::Subslice>
fn get_subslice(&self, range: R) -> Option<Self::Subslice>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<Range<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<Range<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: Range<usize>,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: Range<usize>, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<RangeFrom<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<RangeFrom<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: RangeFrom<usize>,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: RangeFrom<usize>, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<RangeFull> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<RangeFull> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: RangeFull,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: RangeFull, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<RangeInclusive<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<RangeInclusive<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: RangeInclusive<usize>,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: RangeInclusive<usize>, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<RangeTo<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<RangeTo<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: RangeTo<usize>,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: RangeTo<usize>, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B> SliceByValueSubsliceRangeMut<RangeToInclusive<usize>> for BitFieldVec<B>
impl<B> SliceByValueSubsliceRangeMut<RangeToInclusive<usize>> for BitFieldVec<B>
Source§unsafe fn get_subslice_unchecked_mut(
&mut self,
range: RangeToInclusive<usize>,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: RangeToInclusive<usize>, ) -> SubsliceMut<'_, Self>
Source§fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
fn index_subslice_mut(&mut self, range: R) -> Self::SubsliceMut
Source§fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
fn get_subslice_mut(&mut self, range: R) -> Option<Self::SubsliceMut>
slice::get.Source§impl<B: Backend<Word: Word>> TruncateHash<<B as Backend>::Word> for BitFieldVec<B>
impl<B: Backend<Word: Word>> TruncateHash<<B as Backend>::Word> for BitFieldVec<B>
Source§fn truncate_hash(&self, hash: u64) -> B::Word
fn truncate_hash(&self, hash: u64) -> B::Word
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>> for BitFieldVec<Vec<W>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>> for BitFieldVec<Vec<W>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>>
type Error = DifferentAlignmentError<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>> for BitFieldVec<Box<[W]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>> for BitFieldVec<Box<[W]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>>
type Error = DifferentAlignmentError<AtomicBitFieldVec<Box<[<W as AtomicPrimitive>::Atomic]>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>> for BitFieldVec<Vec<W>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>> for BitFieldVec<Vec<W>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>>
type Error = DifferentAlignmentError<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>> for BitFieldVec<Box<[W]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>> for BitFieldVec<Box<[W]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>>
type Error = DifferentAlignmentError<AtomicBitFieldVec<Vec<<W as AtomicPrimitive>::Atomic>>>
Source§impl<'a, W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<&'a mut [W]>> for AtomicBitFieldVec<&'a mut [W::Atomic]>
This conversion may fail if the alignment of W::Atomic is stricter
than that of W.
impl<'a, W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<&'a mut [W]>> for AtomicBitFieldVec<&'a mut [W::Atomic]>
This conversion may fail if the alignment of W::Atomic is stricter
than that of W.
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Box<[W]>>> for AtomicBitFieldVec<Vec<W::Atomic>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Box<[W]>>> for AtomicBitFieldVec<Vec<W::Atomic>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<BitFieldVec<Box<[W]>>>
type Error = DifferentAlignmentError<BitFieldVec<Box<[W]>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Box<[W]>>> for AtomicBitFieldVec<Box<[W::Atomic]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Box<[W]>>> for AtomicBitFieldVec<Box<[W::Atomic]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<BitFieldVec<Box<[W]>>>
type Error = DifferentAlignmentError<BitFieldVec<Box<[W]>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Vec<W>>> for AtomicBitFieldVec<Vec<W::Atomic>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Vec<W>>> for AtomicBitFieldVec<Vec<W::Atomic>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<BitFieldVec<Vec<W>>>
type Error = DifferentAlignmentError<BitFieldVec<Vec<W>>>
Source§impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Vec<W>>> for AtomicBitFieldVec<Box<[W::Atomic]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
impl<W: Word + AtomicPrimitive<Atomic: PrimitiveAtomicUnsigned>> TryFrom<BitFieldVec<Vec<W>>> for AtomicBitFieldVec<Box<[W::Atomic]>>
This conversion may fail if the alignment of W is not the same as
that of W::Atomic; in that case, the error contains the original
vector.
Source§type Error = DifferentAlignmentError<BitFieldVec<Vec<W>>>
type Error = DifferentAlignmentError<BitFieldVec<Vec<W>>>
Source§impl<W: Word> TryIntoUnaligned for BitFieldVec<Box<[W]>>
impl<W: Word> TryIntoUnaligned for BitFieldVec<Box<[W]>>
Source§fn try_into_unaligned(self) -> Result<Self::Unaligned, UnalignedConversionError>
fn try_into_unaligned(self) -> Result<Self::Unaligned, UnalignedConversionError>
Converts a BitFieldVec into a BitFieldVecU, adding a
padding word at the end if one is not already present.
§Errors
Returns an error if the bit width does not satisfy the constraints
of BitFieldVec::get_unaligned_unchecked: it must be at most
W::BITS - 6, or exactly W::BITS - 4, or exactly W::BITS.
Source§impl<B> TypeHash for BitFieldVec<B>
Available on crate feature epserde only.
impl<B> TypeHash for BitFieldVec<B>
epserde only.Source§fn type_hash_val(&self, hasher: &mut impl Hasher)
fn type_hash_val(&self, hasher: &mut impl Hasher)
TypeHash::type_hash on a value.Auto Trait Implementations§
impl<B> Freeze for BitFieldVec<B>
impl<B> RefUnwindSafe for BitFieldVec<B>
impl<B> Send for BitFieldVec<B>
impl<B> Sync for BitFieldVec<B>
impl<B> Unpin for BitFieldVec<B>
impl<B> UnsafeUnpin for BitFieldVec<B>
impl<B> UnwindSafe for BitFieldVec<B>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeepCopy for T
impl<T> DeepCopyInSeq for Twhere
T: DeepCopy,
Source§impl<T> Deserialize for T
impl<T> Deserialize for T
Source§unsafe fn deserialize_full(backend: &mut impl ReadNoStd) -> Result<T, Error>
unsafe fn deserialize_full(backend: &mut impl ReadNoStd) -> Result<T, Error>
§Safety
See the documentation of Deserialize.
Source§unsafe fn deserialize_eps(
backend: &[u8],
) -> Result<<T as DeserInner>::DeserType<'_>, Error>
unsafe fn deserialize_eps( backend: &[u8], ) -> Result<<T as DeserInner>::DeserType<'_>, Error>
§Safety
See the documentation of Deserialize.
Source§unsafe fn load_full(path: impl AsRef<Path>) -> Result<Self, Error>
unsafe fn load_full(path: impl AsRef<Path>) -> Result<Self, Error>
std only.Source§unsafe fn load_mem(path: impl AsRef<Path>) -> Result<MemCase<Self>, Error>
unsafe fn load_mem(path: impl AsRef<Path>) -> Result<MemCase<Self>, Error>
std only.Source§unsafe fn read_mmap(
read: impl ReadNoStd,
size: usize,
flags: Flags,
) -> Result<MemCase<Self>, Error>
unsafe fn read_mmap( read: impl ReadNoStd, size: usize, flags: Flags, ) -> Result<MemCase<Self>, Error>
mmap only.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> EitherFullOrEpsCopy<T> for Twhere
T: ?Sized,
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
key and return true if they are equal.impl<T> FullCopyConsistent<T> for Twhere
T: ?Sized,
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> ⓘ
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> ⓘ
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>
std only.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>
core::fmt::Write debug info 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>
std only.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>
core::fmt::Write debug info 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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
Source§unsafe fn ser_on_field_write(
&self,
backend: &mut impl WriteWithNames,
) -> Result<(), Error>
unsafe fn ser_on_field_write( &self, backend: &mut impl WriteWithNames, ) -> Result<(), Error>
WriteWithNames. Read more