Skip to main content

ServiceFactory

Trait ServiceFactory 

Source
pub trait ServiceFactory:
    Send
    + Sync
    + 'static {
    // Required method
    fn create(&self) -> Box<dyn Service>;
}
Expand description

服务工厂特征

Required Methods§

Source

fn create(&self) -> Box<dyn Service>

创建新的服务实例

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§