pub struct RecordedInput<'a, I, R = Vec<u8>> { /* private fields */ }Expand description
Input wrapper which records the bytes read.
Implementations§
Source§impl<'a, I, R> RecordedInput<'a, I, R>
impl<'a, I, R> RecordedInput<'a, I, R>
Trait Implementations§
Source§impl<'a, I: Input, R: Extend<u8>> Input for RecordedInput<'a, I, R>
impl<'a, I: Input, R: Extend<u8>> Input for RecordedInput<'a, I, R>
Source§fn remaining_len(&mut self) -> Result<Option<usize>, Error>
fn remaining_len(&mut self) -> Result<Option<usize>, Error>
Should return the remaining length of the input data. If no information about the input
length is available,
None should be returned. Read moreSource§fn read(&mut self, into: &mut [u8]) -> Result<(), Error>
fn read(&mut self, into: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill the given buffer. Read more
Source§fn descend_ref(&mut self) -> Result<(), Error>
fn descend_ref(&mut self) -> Result<(), Error>
Descend into nested reference when decoding.
This is called when decoding a new refence-based instance,
such as
Vec or Box. Currently, all such types are
allocated on the heap.Source§fn ascend_ref(&mut self)
fn ascend_ref(&mut self)
Ascend to previous structure level when decoding.
This is called when decoding reference-based type is finished.
Auto Trait Implementations§
impl<'a, I, R = Vec<u8>> !UnwindSafe for RecordedInput<'a, I, R>
impl<'a, I, R> Freeze for RecordedInput<'a, I, R>
impl<'a, I, R> RefUnwindSafe for RecordedInput<'a, I, R>
impl<'a, I, R> Send for RecordedInput<'a, I, R>
impl<'a, I, R> Sync for RecordedInput<'a, I, R>
impl<'a, I, R> Unpin for RecordedInput<'a, I, R>
impl<'a, I, R> UnsafeUnpin for RecordedInput<'a, I, R>
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> DecodeInto for Twhere
T: Input,
impl<T> DecodeInto for Twhere
T: Input,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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