pub trait CompactSyncable: ExampleDatabase {
// Required method
fn current_target(
&self,
) -> impl Future<Output = Target<Self::Family, Key>> + Send;
}Expand description
Capability trait for databases that can serve compact sync targets.
Compact sync does not replay historical operations. Instead, the server exposes the latest authenticated target for the database family, and the client reconstructs a compact-storage local database from that authenticated state.
Required Methods§
Sourcefn current_target(
&self,
) -> impl Future<Output = Target<Self::Family, Key>> + Send
fn current_target( &self, ) -> impl Future<Output = Target<Self::Family, Key>> + Send
Return the latest compact-sync target this database can currently serve.
Full databases implement this so they can act as compact-sync sources, and compact-storage databases implement it so compact nodes can sync from each other. The client still materializes into compact storage in both cases.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".