Trait Storage

Source
pub trait Storage {
Show 13 methods // Required methods fn get_individual( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>; fn get_value( &mut self, storage: StorageId, key: &str, ) -> StorageResult<String>; fn get_raw_value( &mut self, storage: StorageId, key: &str, ) -> StorageResult<Vec<u8>>; fn put_value( &mut self, storage: StorageId, key: &str, val: &str, ) -> StorageResult<()>; fn put_raw_value( &mut self, storage: StorageId, key: &str, val: Vec<u8>, ) -> StorageResult<()>; fn remove_value( &mut self, storage: StorageId, key: &str, ) -> StorageResult<()>; fn count(&mut self, storage: StorageId) -> StorageResult<usize>; // Provided methods fn get_individual_from_db( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()> { ... } fn get_v(&mut self, storage: StorageId, key: &str) -> Option<String> { ... } fn get_raw(&mut self, storage: StorageId, key: &str) -> Vec<u8> โ“˜ { ... } fn put_kv(&mut self, storage: StorageId, key: &str, val: &str) -> bool { ... } fn put_kv_raw( &mut self, storage: StorageId, key: &str, val: Vec<u8>, ) -> bool { ... } fn remove(&mut self, storage: StorageId, key: &str) -> bool { ... }
}

Required Methodsยง

Source

fn get_individual( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

Source

fn get_value(&mut self, storage: StorageId, key: &str) -> StorageResult<String>

Source

fn get_raw_value( &mut self, storage: StorageId, key: &str, ) -> StorageResult<Vec<u8>>

Source

fn put_value( &mut self, storage: StorageId, key: &str, val: &str, ) -> StorageResult<()>

Source

fn put_raw_value( &mut self, storage: StorageId, key: &str, val: Vec<u8>, ) -> StorageResult<()>

Source

fn remove_value(&mut self, storage: StorageId, key: &str) -> StorageResult<()>

Source

fn count(&mut self, storage: StorageId) -> StorageResult<usize>

Provided Methodsยง

Source

fn get_individual_from_db( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

๐Ÿ‘ŽDeprecated since 0.1.0: Use get_individual instead
Source

fn get_v(&mut self, storage: StorageId, key: &str) -> Option<String>

๐Ÿ‘ŽDeprecated since 0.1.0: Use get_value instead
Source

fn get_raw(&mut self, storage: StorageId, key: &str) -> Vec<u8> โ“˜

๐Ÿ‘ŽDeprecated since 0.1.0: Use get_raw_value instead
Source

fn put_kv(&mut self, storage: StorageId, key: &str, val: &str) -> bool

๐Ÿ‘ŽDeprecated since 0.1.0: Use put_value instead
Source

fn put_kv_raw(&mut self, storage: StorageId, key: &str, val: Vec<u8>) -> bool

๐Ÿ‘ŽDeprecated since 0.1.0: Use put_raw_value instead
Source

fn remove(&mut self, storage: StorageId, key: &str) -> bool

๐Ÿ‘ŽDeprecated since 0.1.0: Use remove_value instead

Implementorsยง