pub trait Syncable: ExampleDatabase {
// Required methods
fn size(&self) -> impl Future<Output = Location<Self::Family>> + Send;
fn sync_boundary(
&self,
) -> impl Future<Output = Location<Self::Family>> + Send;
fn historical_proof(
&self,
op_count: Location<Self::Family>,
start_loc: Location<Self::Family>,
max_ops: NonZeroU64,
) -> impl Future<Output = Result<(Proof<Self::Family, Key>, Vec<Self::Operation>), Error<Self::Family>>> + Send;
fn pinned_nodes_at(
&self,
loc: Location<Self::Family>,
) -> impl Future<Output = Result<Vec<Key>, Error<Self::Family>>> + Send;
}Expand description
Capability trait for databases that support full replay-based sync.
These databases retain enough history to serve authenticated operations over a range, so the client can fetch and replay them into the same database family.
Required Methods§
Sourcefn size(&self) -> impl Future<Output = Location<Self::Family>> + Send
fn size(&self) -> impl Future<Output = Location<Self::Family>> + Send
Get the total number of operations in the database (including pruned operations).
Sourcefn sync_boundary(&self) -> impl Future<Output = Location<Self::Family>> + Send
fn sync_boundary(&self) -> impl Future<Output = Location<Self::Family>> + Send
Get the most recent location from which this database can safely be synced.
Callers constructing a sync target should use this value (or any earlier retained
location) as the range.start.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".