Trait random_access_storage::RandomAccessMethods
[−]
[src]
pub trait RandomAccessMethods { fn open(&mut self) -> Result<(), Error>; fn write(&mut self, offset: usize, data: &[u8]) -> Result<(), Error>; fn read(&mut self, offset: usize, length: usize) -> Result<Vec<u8>, Error>; fn del(&mut self, offset: usize, length: usize) -> Result<(), Error>; }
Methods that need to be implemented for the Sync
struct.
Required Methods
fn open(&mut self) -> Result<(), Error>
Open the backend.
fn write(&mut self, offset: usize, data: &[u8]) -> Result<(), Error>
Write bytes at an offset to the backend.
fn read(&mut self, offset: usize, length: usize) -> Result<Vec<u8>, Error>
Read a sequence of bytes at an offset from the backend.
fn del(&mut self, offset: usize, length: usize) -> Result<(), Error>
Delete a sequence of bytes at an offset from the backend.