FrameworkAdapter

Trait FrameworkAdapter 

Source
pub trait FrameworkAdapter: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn initialize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

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

框架适配器trait

用于定义框架特定的集成逻辑

Required Methods§

Source

fn name(&self) -> &str

框架名称

Source

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

初始化框架集成

Provided Methods§

Source

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

清理资源

Implementors§