Trait stream_inmemory::TRead[][src]

pub trait TRead {
    fn peek_byte(&self) -> Result<u8, StreamError>;
fn peek(&self, buffer: &mut [u8]) -> Result<usize, StreamError>;
fn read_byte(&mut self) -> Result<u8, StreamError>;
fn read(&mut self, buffer: &mut [u8]) -> Result<usize, StreamError>;
fn skip(&mut self, count: usize) -> usize;
fn skip_all(&mut self) -> usize;
fn view(&self) -> &[u8];
fn available(&self) -> usize; }

Required methods

Peek one byte from stream, position don’t shift.

Can return EOF error.

Peek bytes from stream, position don’t shift.

Can return EOF, ZeroLength errors.

Read one byte from stream, position shifted.

Can return EOF error.

Read bytes from stream, position shifted.

Can return EOF, ZeroLength errors.

Skip “count” bytes in stream, position shifted.

Skip all bytes in stream, position shifted.

View of available bytes in stream.

Return available to read bytes.

Implementors

Peek one byte from stream, position don’t shift.

Can return EOF error.

Peek bytes from stream, position don’t shift.

Can return EOF, ZeroLength errors.

Read one byte from stream, position shifted.

Can return EOF error.

Read bytes from stream, position shifted.

Can return EOF, ZeroLength errors.

Skip “count” bytes in stream. Return skipped bytes count.

Skip all bytes in stream. Return skipped bytes count.

View of available bytes in stream.

Return available to read bytes.