Input

Trait Input 

Source
pub trait Input<const N: usize> {
    // Required methods
    fn next_chunk(&mut self) -> Option<&[u8]>;
    fn remainder(&self) -> &[u8] ;
}
Expand description

An input for decode.

Required Methods§

Source

fn next_chunk(&mut self) -> Option<&[u8]>

Get the next chunk of size N from the input.

Returns None if the input doesn’t have sufficient number of bytes.

Source

fn remainder(&self) -> &[u8]

Get the remainder of the input.

Should only be called after next_chunk returns None.

Implementations on Foreign Types§

Source§

impl<const N: usize> Input<N> for &[u8]

Source§

fn next_chunk(&mut self) -> Option<&[u8]>

Source§

fn remainder(&self) -> &[u8]

Implementors§

Source§

impl Input<8> for PathBufInput<'_>

Available on crate feature std only.