Trait ByteSource

Source
pub trait ByteSource: Sealed {
    type ReadError: ByteSourceErr;

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

Helper trait that allows reading individual bytes

Required Associated Types§

Source

type ReadError: ByteSourceErr

Type of errors that can occur while reading bytes

Required Methods§

Source

fn read_byte(&mut self) -> Result<u8, Self::ReadError>

Tries to read a single byte from the source

Implementors§

Source§

impl<'i> ByteSource for SliceReader<'i>

Source§

impl<I, B> ByteSource for IterReader<I, B>
where I: Iterator<Item = B>, B: Borrow<u8>,

Source§

impl<R> ByteSource for IoReader<R>
where R: Read,

Available on crate feature std only.
Source§

impl<R, E> ByteSource for EhReader<R, E>
where R: Read<u8, Error = E>,

Available on crate feature embedded_hal only.