Struct random_access_storage::Sync
[−]
[src]
pub struct Sync<T> {
pub opened: bool,
// some fields omitted
}Create a synchronous instance.
Fields
opened: bool
Check whether or not the file has been opened.
Methods
impl<T> Sync<T> where
T: SyncMethods, [src]
T: SyncMethods,
pub fn new(handler: T) -> Sync<T>[src]
Create a new Sync instance.
pub fn write(&mut self, offset: usize, data: &[u8]) -> Result<(), Error>[src]
Write bytes at an offset. Calls SyncMethods::write under the hood.
pub fn read(&mut self, offset: usize, length: usize) -> Result<Vec<u8>, Error>[src]
Write bytes from an offset. Calls SyncMethods::read under the hood.
pub fn del(&mut self, offset: usize, length: usize) -> Result<(), Error>[src]
Delete bytes from an offset. Calls SyncMethods::del under the hood.