pub struct VecDecoder<T: Decodable> { /* private fields */ }Expand description
A decoder that decodes a vector of Ts.
The decoding is expected to start with expected number of items in the vector.
Implementations§
Trait Implementations§
Source§impl<T: Decodable> Decoder for VecDecoder<T>
Available on crate feature alloc only.
impl<T: Decodable> Decoder for VecDecoder<T>
Available on crate feature
alloc only.Source§type Error = VecDecoderError<<<T as Decodable>::Decoder as Decoder>::Error>
type Error = VecDecoderError<<<T as Decodable>::Decoder as Decoder>::Error>
The error type that this decoder can produce.
Source§fn push_bytes(&mut self, bytes: &mut &[u8]) -> Result<bool, Self::Error>
fn push_bytes(&mut self, bytes: &mut &[u8]) -> Result<bool, Self::Error>
Push bytes into the decoder, consuming as much as possible. Read more
Source§fn end(self) -> Result<Self::Output, Self::Error>
fn end(self) -> Result<Self::Output, Self::Error>
Complete the decoding process and return the final result. Read more
Source§fn read_limit(&self) -> usize
fn read_limit(&self) -> usize
Returns the maximum number of bytes this decoder can consume without over-reading. Read more
Auto Trait Implementations§
impl<T> Freeze for VecDecoder<T>
impl<T> RefUnwindSafe for VecDecoder<T>
impl<T> Send for VecDecoder<T>
impl<T> Sync for VecDecoder<T>
impl<T> Unpin for VecDecoder<T>
impl<T> UnwindSafe for VecDecoder<T>
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