Skip to main content

ModuleStarter

Trait ModuleStarter 

Source
pub trait ModuleStarter<Context>: Send {
    // Required methods
    fn descriptor(&self) -> ModuleDescriptor;
    fn start<'life0, 'async_trait>(
        self: Box<Self>,
        context: &'life0 mut Context,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ServiceHandle>>, StartupError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn descriptor(&self) -> ModuleDescriptor

Source

fn start<'life0, 'async_trait>( self: Box<Self>, context: &'life0 mut Context, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ServiceHandle>>, StartupError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§