Trait ServerFactory

Source
pub trait ServerFactory {
    type Config: DeserializeOwned;
    type Server: IServer + Sized + 'static;

    const NAME: &'static str;

    // Required method
    fn new(
        listen_net: Net,
        net: Net,
        config: Self::Config,
    ) -> Result<Self::Server>;

    // Provided method
    fn into_dyn() -> FromConfig<Server> { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn new(listen_net: Net, net: Net, config: Self::Config) -> Result<Self::Server>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§