Reader

Trait Reader 

Source
pub trait Reader {
    // Required method
    fn read(&mut self) -> Result<Option<Vec<u8>>>;
}
Expand description

is the general trait for all readers.

Required Methods§

Source

fn read(&mut self) -> Result<Option<Vec<u8>>>

returns a message if there is one. And returns any error if it cannot return the message. It returns a Ok(None) if file reader has reached to the end of the file, or there is no new message currently, in which case user should retry.

Implementors§