Trait diffusion::Reader [] [src]

pub trait Reader {
    fn read(&mut self) -> Result<Option<Vec<u8>>>;
}

is the general trait for all readers.

Required Methods

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