Trait rustdb::stg::Storage [−][src]
pub trait Storage: Send + Sync {
fn size(&self) -> u64;
fn read(&self, start: u64, data: &mut [u8]);
fn write(&self, start: u64, data: &[u8]);
fn commit(&self, size: u64);
fn write_vec(&self, start: u64, data: Vec<u8>) { ... }
fn write_data(&self, start: u64, data: Data, off: usize, len: usize) { ... }
fn write_u64(&self, start: u64, value: u64) { ... }
fn read_u64(&self, start: u64) -> u64 { ... }
}
Expand description
Interface for database storage.
Required methods
Get the size of the underlying storage. Note : this is valid initially and after a commit but is not defined after write is called.
Provided methods
Write Data slice to storage.