pub struct CoreVecDecoder<T: Decoder, const MAX_INITIAL_CAPACITY: usize = DEFAULT_MAX_INITIAL_CAPACITY> { /* private fields */ }Expand description
core:vec decoder
At most MAX_INITIAL_CAPACITY bytes are preallocated based on the vector length read from the input
Implementations§
Source§impl<T, const MAX_INITIAL_CAPACITY: usize> CoreVecDecoder<T, MAX_INITIAL_CAPACITY>where
T: Decoder,
impl<T, const MAX_INITIAL_CAPACITY: usize> CoreVecDecoder<T, MAX_INITIAL_CAPACITY>where
T: Decoder,
pub fn new(decoder: T) -> Self
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T: Debug + Decoder, const MAX_INITIAL_CAPACITY: usize> Debug for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T: Debug + Decoder, const MAX_INITIAL_CAPACITY: usize> Debug for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
Source§impl<T, const MAX_INITIAL_CAPACITY: usize> Decoder for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T, const MAX_INITIAL_CAPACITY: usize> Decoder for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl<T, const MAX_INITIAL_CAPACITY: usize> Freeze for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>where
T: Freeze,
impl<T, const MAX_INITIAL_CAPACITY: usize> RefUnwindSafe for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T, const MAX_INITIAL_CAPACITY: usize> Send for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T, const MAX_INITIAL_CAPACITY: usize> Sync for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T, const MAX_INITIAL_CAPACITY: usize> Unpin for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
impl<T, const MAX_INITIAL_CAPACITY: usize> UnsafeUnpin for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>where
T: UnsafeUnpin,
impl<T, const MAX_INITIAL_CAPACITY: usize> UnwindSafe for CoreVecDecoder<T, MAX_INITIAL_CAPACITY>
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