Skip to main content

SyncSource

Trait SyncSource 

Source
pub trait SyncSource:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn sync<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 SyncContext,
    ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

How a particular kind of data is fetched.

Implementations answer how, never when. They do not sleep, do not retry and do not decide whether the machine is online — the engine owns all of that.

Required Methods§

Source

fn sync<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 SyncContext, ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§