pub trait Reader { // Required method fn read(&mut self) -> Result<Option<Vec<u8>>>; }
is the general trait for all readers.
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.
Ok(None)