RemoteSync

Trait RemoteSync 

Source
pub trait RemoteSync {
    type Error: Error + Debug;

    // Required methods
    fn sync<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sync_with_options<'life0, 'life1, 'async_trait>(
        &'life0 self,
        options: &'life1 SyncOptions,
    ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn force_update<'life0, 'async_trait>(
        &'life0 self,
        account_data: UpdateSet,
    ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sync_file_transfers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for types that can sync with a single remote.

Required Associated Types§

Source

type Error: Error + Debug

Error type for remote sync.

Required Methods§

Source

fn sync<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform a full sync of the account using the default options.

If the account does not exist on the remote server the account will be created and RemoteSync::sync_file_transfers will be called to ensure the transfers queue is synced.

Source

fn sync_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 SyncOptions, ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Perform a full sync of the account using the given options.

See the documentation for RemoteSync::sync for more details.

Source

fn force_update<'life0, 'async_trait>( &'life0 self, account_data: UpdateSet, ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Force update an account on remote servers.

Should be called after making destructive changes to an account’s folders. For example, if the encryption cipher has been changed, a folder password was changed or folder(s) were compacted.

Source

fn sync_file_transfers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RemoteResult<Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature files only.

Sync file transfers.

Updates the file transfers queue with any pending uploads or downloads by comparing the local file state with the file state on remote server(s).

Implementors§