Trait sos_protocol::Merge

source ·
pub trait Merge {
    // Required methods
    fn merge_identity<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        diff: FolderDiff,
        outcome: &'life1 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn compare_identity<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn merge_account<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        diff: AccountDiff,
        outcome: &'life1 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, HashSet<VaultId>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn compare_account<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn merge_device<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        diff: DeviceDiff,
        outcome: &'life1 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn compare_device<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn merge_files<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        diff: FileDiff,
        outcome: &'life1 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn compare_files<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn merge_folder<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        folder_id: &'life1 VaultId,
        diff: FolderDiff,
        outcome: &'life2 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, Vec<WriteEvent>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn compare_folder<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        folder_id: &'life1 VaultId,
        state: &'life2 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn compare<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        remote_status: &'life1 SyncStatus,
    ) -> Pin<Box<dyn Future<Output = Result<SyncCompare>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn merge<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        diff: SyncDiff,
        outcome: &'life1 mut MergeOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<SyncCompare>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Types that can merge diffs.

Required Methods§

source

fn merge_identity<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: FolderDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge changes to the identity folder.

source

fn compare_identity<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Compare the identity folder.

source

fn merge_account<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: AccountDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, HashSet<VaultId>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge changes to the account event log.

source

fn compare_account<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Compare the account events.

source

fn merge_device<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: DeviceDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge changes to the devices event log.

source

fn compare_device<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Compare the device events.

source

fn merge_files<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: FileDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature files only.

Merge changes to the files event log.

source

fn compare_files<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature files only.

Compare the file events.

source

fn merge_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, diff: FolderDiff, outcome: &'life2 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, Vec<WriteEvent>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Merge changes to a folder.

source

fn compare_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, state: &'life2 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Compare folder events.

Provided Methods§

source

fn compare<'life0, 'life1, 'async_trait>( &'life0 mut self, remote_status: &'life1 SyncStatus, ) -> Pin<Box<dyn Future<Output = Result<SyncCompare>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Compare the local state to a remote status.

source

fn merge<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: SyncDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<SyncCompare>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge a diff into this storage.

Implementations on Foreign Types§

source§

impl Merge for LocalAccount

Available on crate feature account only.
source§

fn merge_identity<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: FolderDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn compare_identity<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn merge_account<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: AccountDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, HashSet<VaultId>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn compare_account<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn merge_device<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: DeviceDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn compare_device<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn merge_files<'life0, 'life1, 'async_trait>( &'life0 mut self, diff: FileDiff, outcome: &'life1 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<CheckedPatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature files only.
source§

fn compare_files<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature files only.
source§

fn merge_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, diff: FolderDiff, outcome: &'life2 mut MergeOutcome, ) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, Vec<WriteEvent>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn compare_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, state: &'life2 CommitState, ) -> Pin<Box<dyn Future<Output = Result<Comparison>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§