Struct stream_inmemory::Reader [−][src]
pub struct Reader<'a> { /* fields omitted */ }Expand description
Reader for inmemory stream
Implementations
impl<'a> Reader<'a>[src]
impl<'a> Reader<'a>[src]pub fn peek_byte(&self) -> Result<u8, StreamError>[src]
pub fn peek_byte(&self) -> Result<u8, StreamError>[src]Peek one byte from stream, position don’t shift.
Can return EOF error.
pub fn peek(&self, buffer: &mut [u8]) -> Result<usize, StreamError>[src]
pub fn peek(&self, buffer: &mut [u8]) -> Result<usize, StreamError>[src]Peek bytes from stream, position don’t shift.
Can return EOF, ZeroLength errors.
pub fn read_byte(&mut self) -> Result<u8, StreamError>[src]
pub fn read_byte(&mut self) -> Result<u8, StreamError>[src]Read one byte from stream, position shifted.
Can return EOF error.
pub fn read(&mut self, buffer: &mut [u8]) -> Result<usize, StreamError>[src]
pub fn read(&mut self, buffer: &mut [u8]) -> Result<usize, StreamError>[src]Read bytes from stream, position shifted.
Can return EOF, ZeroLength errors.
pub fn truncate_readied(&mut self)[src]
pub fn truncate_readied(&mut self)[src]Clear bytes that have been read. Has no effect on the allocated capacity.
pub fn truncate_capacity(&mut self)[src]
pub fn truncate_capacity(&mut self)[src]Truncate the capacity of the stream as much as possible.