pub struct ArrayDecoder<const N: usize> { /* private fields */ }Expand description
A decoder that expects exactly N bytes and returns them as an array.
Implementations§
Trait Implementations§
Source§impl<const N: usize> Clone for ArrayDecoder<N>
impl<const N: usize> Clone for ArrayDecoder<N>
Source§fn clone(&self) -> ArrayDecoder<N>
fn clone(&self) -> ArrayDecoder<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for ArrayDecoder<N>
impl<const N: usize> Debug for ArrayDecoder<N>
Source§impl<const N: usize> Decoder for ArrayDecoder<N>
impl<const N: usize> Decoder for ArrayDecoder<N>
Source§type Error = UnexpectedEofError
type Error = UnexpectedEofError
The error type that this decoder can produce.
Source§fn push_bytes(
&mut self,
bytes: &mut &[u8],
) -> Result<DecoderStatus, Self::Error>
fn push_bytes( &mut self, bytes: &mut &[u8], ) -> Result<DecoderStatus, Self::Error>
Pushes 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>
Completes the decoding process and returns 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<const N: usize> Freeze for ArrayDecoder<N>
impl<const N: usize> RefUnwindSafe for ArrayDecoder<N>
impl<const N: usize> Send for ArrayDecoder<N>
impl<const N: usize> Sync for ArrayDecoder<N>
impl<const N: usize> Unpin for ArrayDecoder<N>
impl<const N: usize> UnsafeUnpin for ArrayDecoder<N>
impl<const N: usize> UnwindSafe for ArrayDecoder<N>
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