SMTDatabase

Trait SMTDatabase 

Source
pub trait SMTDatabase {
    // Required methods
    fn get(&self, key: &BigInt) -> Option<Vec<BigInt>>;
    fn set(&mut self, key: BigInt, value: Vec<BigInt>);
    fn delete(&mut self, key: &BigInt);
    fn get_root(&self) -> BigInt;
    fn set_root(&mut self, root: BigInt);
    fn multi_ins(&mut self, inserts: Vec<(BigInt, Vec<BigInt>)>);
    fn multi_del(&mut self, deletes: Vec<BigInt>);
}
Expand description

Database trait for SMT storage

Required Methods§

Source

fn get(&self, key: &BigInt) -> Option<Vec<BigInt>>

Get a value from the database

Source

fn set(&mut self, key: BigInt, value: Vec<BigInt>)

Set a value in the database

Source

fn delete(&mut self, key: &BigInt)

Delete a value from the database

Source

fn get_root(&self) -> BigInt

Get the current root

Source

fn set_root(&mut self, root: BigInt)

Set the current root

Source

fn multi_ins(&mut self, inserts: Vec<(BigInt, Vec<BigInt>)>)

Insert multiple values

Source

fn multi_del(&mut self, deletes: Vec<BigInt>)

Delete multiple values

Implementors§