IoRead

Trait IoRead 

Source
pub trait IoRead<'de> {
    type Error: Error + 'static;

    // Required method
    fn read_slice<'a>(
        &'a mut self,
        len: usize,
    ) -> Result<Reference<'de, 'a>, Self::Error>;
}
Expand description

decode input source

Required Associated Types§

Source

type Error: Error + 'static

Error type produced by the reader.

Required Methods§

Source

fn read_slice<'a>( &'a mut self, len: usize, ) -> Result<Reference<'de, 'a>, Self::Error>

read exactly len bytes and consume

Implementors§

Source§

impl<'de> IoRead<'de> for SliceReader<'de>

Source§

impl<'de, I> IoRead<'de> for IterReader<I>
where I: Iterator<Item = u8>,

Available on crate feature alloc only.
Source§

impl<'de, R> IoRead<'de> for StdReader<R>
where R: Read,

Available on crate feature std only.