pub trait LogStore {
type Value: Codec + Clone;
// Required methods
fn is_empty(&self) -> bool;
fn op_count(&self) -> Location;
fn inactivity_floor_loc(&self) -> Location;
fn get_metadata(
&self,
) -> impl Future<Output = Result<Option<Self::Value>, Error>>;
}Expand description
A trait for any key-value store based on an append-only log of operations.
Required Associated Types§
Required Methods§
Sourcefn op_count(&self) -> Location
fn op_count(&self) -> Location
The number of operations that have been applied to this db, including those that have been pruned and those that are not yet committed.
Sourcefn inactivity_floor_loc(&self) -> Location
fn inactivity_floor_loc(&self) -> Location
Return the inactivity floor location. This is the location before which all operations are known to be inactive. Operations before this point can be safely pruned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.