Trait darkfi_sdk::crypto::smt::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§