Database

Type Alias Database 

Source
pub type Database<E> = Any<E, Key, Value, Hasher, Translator>;
Expand description

Database type alias.

Aliased Type§

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

Trait Implementations§

Source§

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

Source§

type Operation = Fixed<Digest, Digest>

The type of operations in the database.
Source§

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

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

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

Add operations to the database.
Source§

async fn commit(&mut self) -> Result<(), Error>

Commit pending operations to the database.
Source§

fn root(&self, hasher: &mut Standard<Sha256>) -> Key

Get the database’s root digest.
Source§

fn op_count(&self) -> u64

Get the operation count of the database.
Source§

fn lower_bound_ops(&self) -> u64

Get the lower bound for operations (inactivity floor or oldest retained location).
Source§

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

Get historical proof and operations.
Source§

fn name() -> &'static str

Get the database type name for logging.