Struct random_access_storage::RandomAccess
[−]
[src]
pub struct RandomAccess<T> {
pub opened: bool,
// some fields omitted
}Create a random access instance.
Fields
opened: bool
Check whether or not the file has been opened.
Methods
impl<T> RandomAccess<T> where
T: RandomAccessMethods, [src]
T: RandomAccessMethods,
pub fn new(handler: T) -> RandomAccess<T>[src]
Create a new RandomAccess 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.
Trait Implementations
impl<T: Debug> Debug for RandomAccess<T>[src]
Auto Trait Implementations
impl<T> Send for RandomAccess<T> where
T: Send,
T: Send,
impl<T> Sync for RandomAccess<T> where
T: Sync,
T: Sync,