Struct musli_binary_common::reader::SliceReader
source · [−]pub struct SliceReader<'de> { /* private fields */ }
Expand description
An efficient Reader wrapper around a slice.
Implementations
Trait Implementations
sourceimpl<'de> Reader<'de> for SliceReader<'de>
impl<'de> Reader<'de> for SliceReader<'de>
type Error = SliceReaderError
type Error = SliceReaderError
Error type raised by the current reader.
sourcefn read_bytes<V>(&mut self, n: usize, visitor: V) -> Result<V::Ok, V::Error> where
V: ValueVisitor<'de, Target = [u8], Error = Self::Error>,
fn read_bytes<V>(&mut self, n: usize, visitor: V) -> Result<V::Ok, V::Error> where
V: ValueVisitor<'de, Target = [u8], Error = Self::Error>,
Read a slice out of the current reader.
sourcefn read(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>
Read a slice into the given buffer.
sourcefn read_array<const N: usize>(&mut self) -> Result<[u8; N], Self::Error>
fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Self::Error>
Read an array out of the current reader.
sourcefn with_position(self) -> WithPosition<Self> where
Self: Sized,
fn with_position(self) -> WithPosition<Self> where
Self: Sized,
Keep an accurate record of the position within the reader.
Auto Trait Implementations
impl<'de> RefUnwindSafe for SliceReader<'de>
impl<'de> !Send for SliceReader<'de>
impl<'de> !Sync for SliceReader<'de>
impl<'de> Unpin for SliceReader<'de>
impl<'de> UnwindSafe for SliceReader<'de>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more