Trait lzss::Read

source ·
pub trait Read {
    type Error;

    // Required method
    fn read(&mut self) -> Result<Option<u8>, Self::Error>;
}
Expand description

Trait for reading bytes.

Required Associated Types§

source

type Error

The error which can happen during a read operation.

Use Void when no error can be emitted.

Required Methods§

source

fn read(&mut self) -> Result<Option<u8>, Self::Error>

Read a byte.

Return Ok(None) in case of eof.

Please be aware that even after reading an eof it may be tried again (which then also has to result in an eof).

Implementors§

source§

impl<'a> Read for SliceReader<'a>

§

type Error = Void

source§

impl<'a, R: Read> Read for IOSimpleReader<'a, R>

§

type Error = Error