darkfi_sdk::crypto::smt

Trait StorageAdapter

Source
pub trait StorageAdapter {
    type Value;

    // Required methods
    fn put(&mut self, key: BigUint, value: Self::Value) -> ContractResult;
    fn get(&self, key: &BigUint) -> Option<Self::Value>;
    fn del(&mut self, key: &BigUint) -> ContractResult;
}
Expand description

Pluggable storage backend for the SMT. Has a minimal interface to put, get, and delete objects from the store.

Required Associated Types§

Required Methods§

Source

fn put(&mut self, key: BigUint, value: Self::Value) -> ContractResult

Source

fn get(&self, key: &BigUint) -> Option<Self::Value>

Source

fn del(&mut self, key: &BigUint) -> ContractResult

Implementors§