Trait Store

Source
pub trait Store: Store {
    // Required methods
    fn synced(
        &mut self,
        rid: &RepoId,
        nid: &PublicKey,
        at: Oid,
        timestamp: Timestamp,
    ) -> Result<bool, Error>;
    fn seeded_by(
        &self,
        nid: &PublicKey,
    ) -> Result<Box<dyn Iterator<Item = Result<(RepoId, SyncedAt), Error>> + '_>, Error>;
    fn seeds_for(
        &self,
        rid: &RepoId,
    ) -> Result<Box<dyn Iterator<Item = Result<SyncedSeed, Error>> + '_>, Error>;
}
Expand description

Seed store.

Used to store seed sync statuses.

Required Methods§

Source

fn synced( &mut self, rid: &RepoId, nid: &PublicKey, at: Oid, timestamp: Timestamp, ) -> Result<bool, Error>

Mark a repo as synced on the given node.

Source

fn seeded_by( &self, nid: &PublicKey, ) -> Result<Box<dyn Iterator<Item = Result<(RepoId, SyncedAt), Error>> + '_>, Error>

Get the repos seeded by the given node.

Source

fn seeds_for( &self, rid: &RepoId, ) -> Result<Box<dyn Iterator<Item = Result<SyncedSeed, Error>> + '_>, Error>

Get nodes that have synced the given repo.

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.

Implementors§