pub struct TurboBincodeReader<'a> {
pub buffer: &'a [u8],
}Expand description
This is equivalent to bincode::de::read::SliceReader, but with a little unsafe code to
avoid some redundant bounds checks, and pub access to the underlying buffer.
Fields§
§buffer: &'a [u8]Implementations§
Trait Implementations§
Source§impl Reader for TurboBincodeReader<'_>
impl Reader for TurboBincodeReader<'_>
Source§fn read(&mut self, target_buffer: &mut [u8]) -> Result<(), DecodeError>
fn read(&mut self, target_buffer: &mut [u8]) -> Result<(), DecodeError>
Fill the given
bytes argument with values. Exactly the length of the given slice must be filled, or else an error must be returned.Auto Trait Implementations§
impl<'a> Freeze for TurboBincodeReader<'a>
impl<'a> RefUnwindSafe for TurboBincodeReader<'a>
impl<'a> Send for TurboBincodeReader<'a>
impl<'a> Sync for TurboBincodeReader<'a>
impl<'a> Unpin for TurboBincodeReader<'a>
impl<'a> UnwindSafe for TurboBincodeReader<'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