Daemon

Trait Daemon 

Source
pub trait Daemon {
    type Config;

    // Required methods
    fn load_config(&self, path_maybe: &Option<PathBuf>) -> Result<Self::Config>;
    fn start<'life0, 'async_trait>(
        &'life0 mut self,
        cfg: Self::Config,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn load_config(&self, path_maybe: &Option<PathBuf>) -> Result<Self::Config>

Source

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

Source

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

Implementors§