Trait cyfs_core::StorageObj
source · [−]pub trait StorageObj {
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,;
fn value_mut(&mut self) -> &mut Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,;
fn update_value(&mut self, value: Vec<u8>) -> bool;
fn into_value(self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,;
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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
fn value_mut(&mut self) -> &mut Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
fn update_value(&mut self, value: Vec<u8>) -> bool
fn into_value(self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,