Skip to main content

LifecycleControl

Trait LifecycleControl 

Source
pub trait LifecycleControl: Send + Sync {
    // Required methods
    fn restart_with_config_json<'life0, 'life1, 'async_trait>(
        &'life0 self,
        db: &'life1 Surreal<Any>,
    ) -> Pin<Box<dyn Future<Output = Result<(), OversyncError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn export_config<'life0, 'life1, 'async_trait>(
        &'life0 self,
        db: &'life1 Surreal<Any>,
        format: ExportConfigFormat,
    ) -> Pin<Box<dyn Future<Output = Result<String, OversyncError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn import_config<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        db: &'life1 Surreal<Any>,
        format: ExportConfigFormat,
        content: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, OversyncError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn pause<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resume<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), OversyncError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_running<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_paused<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for lifecycle operations so the API crate doesn’t depend on the root crate.

Required Methods§

Source

fn restart_with_config_json<'life0, 'life1, 'async_trait>( &'life0 self, db: &'life1 Surreal<Any>, ) -> Pin<Box<dyn Future<Output = Result<(), OversyncError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn export_config<'life0, 'life1, 'async_trait>( &'life0 self, db: &'life1 Surreal<Any>, format: ExportConfigFormat, ) -> Pin<Box<dyn Future<Output = Result<String, OversyncError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn import_config<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, db: &'life1 Surreal<Any>, format: ExportConfigFormat, content: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, OversyncError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

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

Source

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

Source

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

Source

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

Implementors§