[][src]Trait irmaseal_core::Readable

pub trait Readable {
    fn read_byte(&mut self) -> Result<u8, Error>;
fn read_bytes(&mut self, n: usize) -> Result<&[u8], Error>; fn read_bytes_strict(&mut self, n: usize) -> Result<&[u8], Error> { ... } }

A readable resource that yields chunks of a bytestream.

Required methods

fn read_byte(&mut self) -> Result<u8, Error>

Read exactly one byte. Will throw Error::EndOfStream if that byte is not available.

fn read_bytes(&mut self, n: usize) -> Result<&[u8], Error>

Read up to n bytes. May yield a slice with a lower number of bytes.

Loading content...

Provided methods

fn read_bytes_strict(&mut self, n: usize) -> Result<&[u8], Error>

Read exactly n bytes.

Loading content...

Implementors

impl<'a> Readable for SliceReader<'a, u8>[src]

Loading content...