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§
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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.
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,
files only.Merge changes to the files event log.
sourcefn 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.
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,
files only.Compare the file events.
sourcefn 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 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.
sourcefn 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,
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§
sourcefn 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 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.
Implementations on Foreign Types§
source§impl Merge for LocalAccount
Available on crate feature account only.
impl Merge for LocalAccount
Available on crate feature
account only.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,
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,
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,
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.