pub struct HashedInput<'a, I: Input> { /* private fields */ }Expand description
A wrapper for Input that hashes the bytes as they are read from the
underlying input.
Implementations§
Trait Implementations§
Source§impl<I: Input> Input for HashedInput<'_, I>
impl<I: Input> Input for HashedInput<'_, I>
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, buf: &mut [u8]) -> Result<(), Error>
fn read(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill the given buffer. Read more
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> Freeze for HashedInput<'a, I>
impl<'a, I> RefUnwindSafe for HashedInput<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for HashedInput<'a, I>where
I: Send,
impl<'a, I> Sync for HashedInput<'a, I>where
I: Sync,
impl<'a, I> Unpin for HashedInput<'a, I>
impl<'a, I> !UnwindSafe for HashedInput<'a, I>
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