Skip to main content

Database

Type Alias Database 

Source
pub type Database<E> = CompactDb<Family, E, Value, Hasher, Sequential>;
Expand description

Database type alias.

Aliased Type§

pub struct Database<E> { /* private fields */ }

Trait Implementations§

Source§

impl<E> CompactSyncable for Database<E>
where E: Storage + Clock + Metrics,

Source§

async fn current_target(&self) -> Target<Self::Family, Key>

Return the latest compact-sync target this database can currently serve. Read more
Source§

impl<E> ExampleDatabase for Database<E>
where E: Storage + Clock + Metrics,

Source§

type Family = Family

The merkle family used by this database.
Source§

type Operation = Operation<Family, FixedEncoding<Digest>>

The type of operations in the database.
Source§

fn create_test_operations( count: usize, seed: u64, starting_loc: u64, ) -> Vec<Self::Operation>

Create test operations with the given count and seed. Read more
Source§

async fn add_operations( &mut self, operations: Vec<Self::Operation>, ) -> Result<(), Error<Family>>

Add operations to the database, ignoring any input that doesn’t end with a commit operation.
Source§

fn current_floor(&self) -> u64

Return the floor anchor a caller should pass as starting_loc when generating a stream to append to this db’s current state.
Source§

fn root(&self) -> Key

Get the database’s root digest.
Source§

fn name() -> &'static str

Get the display name used in logs.