pub trait StorageObj {
// Required methods
fn create(id: &str, value: Vec<u8>) -> Self;
fn create_with_hash(id: &str, value: Vec<u8>) -> Self;
fn id(&self) -> &str;
fn hash(&self) -> &Option<HashValue>;
fn value(&self) -> &Vec<u8> ⓘ;
fn value_mut(&mut self) -> &mut Vec<u8> ⓘ;
fn update_value(&mut self, value: Vec<u8>) -> bool;
fn into_value(self) -> Vec<u8> ⓘ;
fn storage_id(&self) -> StorageId;
}
Required Methods§
fn create(id: &str, value: Vec<u8>) -> Self
fn create_with_hash(id: &str, value: Vec<u8>) -> Self
fn id(&self) -> &str
fn hash(&self) -> &Option<HashValue>
fn value(&self) -> &Vec<u8> ⓘ
fn value_mut(&mut self) -> &mut Vec<u8> ⓘ
fn update_value(&mut self, value: Vec<u8>) -> bool
fn into_value(self) -> Vec<u8> ⓘ
fn storage_id(&self) -> StorageId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.