pub struct ZeroCopyBitSliceRead<'a> { /* private fields */ }
Expand description
A zero copy container that helps read from and write to the bits in a &[u8]
.
Implementations§
Source§impl<'a> ZeroCopyBitSliceRead<'a>
impl<'a> ZeroCopyBitSliceRead<'a>
Sourcepub unsafe fn from_bytes(bytes: &'a [u8]) -> ZeroCopyBitSliceRead<'a>
pub unsafe fn from_bytes(bytes: &'a [u8]) -> ZeroCopyBitSliceRead<'a>
Given a pointer to a &mut [u8]
with a previously initialized `ZeropCopyBitSlice<’a>,
perform zero copy deserialization on the byte array containing the bits.
Auto Trait Implementations§
impl<'a> Freeze for ZeroCopyBitSliceRead<'a>
impl<'a> RefUnwindSafe for ZeroCopyBitSliceRead<'a>
impl<'a> Send for ZeroCopyBitSliceRead<'a>
impl<'a> Sync for ZeroCopyBitSliceRead<'a>
impl<'a> Unpin for ZeroCopyBitSliceRead<'a>
impl<'a> UnwindSafe for ZeroCopyBitSliceRead<'a>
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> 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 more