#[repr(transparent)]struct BlankSliceEncoder(usize);Expand description
This lets us conveniently use the EncodeAsVarULE functionality to create
VarZeroVec<[u8]>s that have the right amount of space for elements
without having to duplicate any unsafe code
Tuple Fields§
§0: usizeTrait Implementations§
Source§impl EncodeAsVarULE<[u8]> for BlankSliceEncoder
impl EncodeAsVarULE<[u8]> for BlankSliceEncoder
Source§fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
Calls
cb with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T. Read moreSource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE typeSource§fn encode_var_ule_write(&self, _dst: &mut [u8])
fn encode_var_ule_write(&self, _dst: &mut [u8])
Write the corresponding
VarULE type to the dst buffer. dst should
be the size of Self::encode_var_ule_len()Auto Trait Implementations§
impl Freeze for BlankSliceEncoder
impl RefUnwindSafe for BlankSliceEncoder
impl Send for BlankSliceEncoder
impl Sync for BlankSliceEncoder
impl Unpin for BlankSliceEncoder
impl UnsafeUnpin for BlankSliceEncoder
impl UnwindSafe for BlankSliceEncoder
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