sos_protocol

Trait SyncStorage

Source
pub trait SyncStorage: StorageEventLogs {
    // Required methods
    fn is_client_storage(&self) -> bool;
    fn sync_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<SyncStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn change_set<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<CreateSet>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Storage implementations that can synchronize.

Required Methods§

Source

fn is_client_storage(&self) -> bool

Determine if this is client-side storage.

Source

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

Get the sync status.

Provided Methods§

Source

fn change_set<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CreateSet>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Change set of all event logs.

Used by network aware implementations to transfer entire accounts.

Implementations on Foreign Types§

Source§

impl SyncStorage for LocalAccount

Available on crate feature account only.
Source§

fn is_client_storage(&self) -> bool

Source§

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

Implementors§

Source§

impl SyncStorage for LinkedAccount

Available on crate feature integration only.