Trait Read

Source
pub trait Read {
    // Required methods
    fn get_id(&self) -> ObjectId;
    fn seek(&mut self, from: SeekFrom, pos: u64) -> Result<u64, Error>;
    fn read_next(&mut self, buf: &mut [u8]) -> Result<usize, Error>;
}
Expand description

Reading operations.

Required Methods§

Source

fn get_id(&self) -> ObjectId

Returns object id.

Source

fn seek(&mut self, from: SeekFrom, pos: u64) -> Result<u64, Error>

Seek to a certain position starting from the beginnging or from the current position.

Source

fn read_next(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Read next portion of data.

Implementors§

Source§

impl<'a> Read for Object<'a>

Source§

impl<'a> Read for ObjectWrite<'a>