pub trait CleanAny: CleanStore<Dirty: DirtyAny<Key = Self::Key, Value = Self::Value, Clean = Self>> {
type Key: Array;
// Required methods
fn get(
&self,
key: &Self::Key,
) -> impl Future<Output = Result<Option<Self::Value>, Error>>;
fn commit(
&mut self,
metadata: Option<Self::Value>,
) -> impl Future<Output = Result<Range<Location>, Error>>;
fn sync(&mut self) -> impl Future<Output = Result<(), Error>>;
fn prune(
&mut self,
prune_loc: Location,
) -> impl Future<Output = Result<(), Error>>;
fn close(self) -> impl Future<Output = Result<(), Error>>;
fn destroy(self) -> impl Future<Output = Result<(), Error>>;
}Expand description
Extension trait for “Any” QMDBs in a clean (merkleized) state.
Required Associated Types§
Required Methods§
Sourcefn get(
&self,
key: &Self::Key,
) -> impl Future<Output = Result<Option<Self::Value>, Error>>
fn get( &self, key: &Self::Key, ) -> impl Future<Output = Result<Option<Self::Value>, Error>>
Get the value for a given key, or None if it has no value.
Sourcefn commit(
&mut self,
metadata: Option<Self::Value>,
) -> impl Future<Output = Result<Range<Location>, Error>>
fn commit( &mut self, metadata: Option<Self::Value>, ) -> impl Future<Output = Result<Range<Location>, Error>>
Commit pending operations to the database, ensuring durability. Returns the location range of committed operations.
Sourcefn prune(
&mut self,
prune_loc: Location,
) -> impl Future<Output = Result<(), Error>>
fn prune( &mut self, prune_loc: Location, ) -> impl Future<Output = Result<(), Error>>
Prune historical operations prior to prune_loc.
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.