Merge

Trait Merge 

Source
pub trait Merge: StorageEventLogs {
    // 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, Self::Error>> + 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>), Self::Error>> + 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, Self::Error>> + 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, Self::Error>> + 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>), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn compare_identity<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 CommitState,
    ) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>
       where Self: Sync + '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, Self::Error>> + Send + 'async_trait>>
       where Self: Sync + '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, Self::Error>> + Send + 'async_trait>>
       where Self: Sync + '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, Self::Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: '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, Self::Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn compare<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        remote_status: &'life1 SyncStatus,
    ) -> Pin<Box<dyn Future<Output = Result<SyncCompare, Self::Error>> + 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, Self::Error>> + 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, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge changes to 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>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge changes to the account event log.

Source

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

Merge changes to the devices event log.

Source

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

Merge changes to a folder.

Provided Methods§

Source

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

Compare the identity folder.

Source

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

Compare the account events.

Source

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

Compare the device events.

Source

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

Available on crate feature files only.

Compare the file events.

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, Self::Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Compare folder events.

Source

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

Merge a diff into this storage.

Implementors§