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
fn peek_byte(&self) -> Result<u8, StreamError>
[src]
fn peek_byte(&self) -> Result<u8, StreamError>
[src]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.
fn read_byte(&mut self) -> Result<u8, StreamError>
[src]
fn read_byte(&mut self) -> Result<u8, StreamError>
[src]Read one byte from stream, position shifted.
Can return EOF error.
Read bytes from stream, position shifted.
Can return EOF, ZeroLength errors.
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.