Struct musli_binary_common::reader::WithPosition
source · [−]pub struct WithPosition<R> { /* private fields */ }
Expand description
Keep a record of the current position.
Constructed through Reader::with_position.
Trait Implementations
sourceimpl<'de, R> Reader<'de> for WithPosition<R> where
R: Reader<'de>,
impl<'de, R> Reader<'de> for WithPosition<R> where
R: Reader<'de>,
sourcefn read_bytes(&mut self, n: usize) -> Result<&'de [u8], Self::Error>
fn read_bytes(&mut self, n: usize) -> Result<&'de [u8], 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<R> RefUnwindSafe for WithPosition<R> where
R: RefUnwindSafe,
impl<R> Send for WithPosition<R> where
R: Send,
impl<R> Sync for WithPosition<R> where
R: Sync,
impl<R> Unpin for WithPosition<R> where
R: Unpin,
impl<R> UnwindSafe for WithPosition<R> where
R: UnwindSafe,
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