Skip to main content

CompactSyncable

Trait CompactSyncable 

Source
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§

Source

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".

Implementors§

Source§

impl<E> CompactSyncable for commonware_sync::databases::immutable::Database<E>
where E: Storage + Clock + Metrics,

Source§

impl<E> CompactSyncable for commonware_sync::databases::immutable_compact::Database<E>
where E: Storage + Clock + Metrics,

Source§

impl<E> CompactSyncable for commonware_sync::databases::keyless::Database<E>
where E: Storage + Clock + Metrics,

Source§

impl<E> CompactSyncable for commonware_sync::databases::keyless_compact::Database<E>
where E: Storage + Clock + Metrics,