pub struct ContentAddressedKv<Ctx, V: Clone> { /* private fields */ }Expand description
ContentAddressedKv data container.
Implementations§
Source§impl<Ctx, V: Clone> ContentAddressedKv<Ctx, V>
impl<Ctx, V: Clone> ContentAddressedKv<Ctx, V>
Sourcepub fn key_for(&self, ctx: &Ctx) -> StorageResult<String>
pub fn key_for(&self, ctx: &Ctx) -> StorageResult<String>
Updates or reads key_for.
Sourcepub fn lookup(&self, ctx: &Ctx) -> StorageResult<Option<V>>
pub fn lookup(&self, ctx: &Ctx) -> StorageResult<Option<V>>
Updates or reads lookup.
Sourcepub fn store(&self, ctx: &Ctx, value: V) -> StorageResult<()>
pub fn store(&self, ctx: &Ctx, value: V) -> StorageResult<()>
Updates or reads store.
Sourcepub fn forget(&self, ctx: &Ctx) -> StorageResult<()>
pub fn forget(&self, ctx: &Ctx) -> StorageResult<()>
Updates or reads forget.
Trait Implementations§
Auto Trait Implementations§
impl<Ctx, V> Freeze for ContentAddressedKv<Ctx, V>
impl<Ctx, V> !RefUnwindSafe for ContentAddressedKv<Ctx, V>
impl<Ctx, V> !Send for ContentAddressedKv<Ctx, V>
impl<Ctx, V> !Sync for ContentAddressedKv<Ctx, V>
impl<Ctx, V> Unpin for ContentAddressedKv<Ctx, V>
impl<Ctx, V> UnsafeUnpin for ContentAddressedKv<Ctx, V>
impl<Ctx, V> !UnwindSafe for ContentAddressedKv<Ctx, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more