Skip to main content

Database

Type Alias Database 

Source
pub type Database<E> = Db<Family, E, Key, Value, Hasher, Translator, CHUNK_SIZE, Sequential>;
Expand description

Database type alias.

Aliased Type§

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

Trait Implementations§

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, Update<Digest, 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.
Source§

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

Source§

async fn size(&self) -> Location

Get the total number of operations in the database (including pruned operations).
Source§

async fn sync_boundary(&self) -> Location

Get the most recent location from which this database can safely be synced. Read more
Source§

fn historical_proof( &self, op_count: Location, start_loc: Location, max_ops: NonZeroU64, ) -> impl Future<Output = Result<(Proof<Key>, Vec<Self::Operation>), Error<Family>>> + Send

Get historical proof and operations.
Source§

fn pinned_nodes_at( &self, loc: Location, ) -> impl Future<Output = Result<Vec<Key>, Error<Family>>> + Send

Get the pinned nodes for a lower operation boundary of loc.