Trait ClientFactory

Source
pub trait ClientFactory {
    type Api: ?Sized;

    // Required method
    fn with_spawner<P, T, S>(
        protocol: P,
        transport: T,
        spawner: S,
    ) -> Arc<Self::Api>
       where P: Protocol<Frame = T> + 'static,
             T: Transport,
             P::Deserializer: Send,
             S: Spawner;

    // Provided method
    fn new<P, T>(protocol: P, transport: T) -> Arc<Self::Api>
       where P: Protocol<Frame = T> + 'static,
             T: Transport,
             P::Deserializer: Send { ... }
}

Required Associated Types§

Required Methods§

Source

fn with_spawner<P, T, S>( protocol: P, transport: T, spawner: S, ) -> Arc<Self::Api>
where P: Protocol<Frame = T> + 'static, T: Transport, P::Deserializer: Send, S: Spawner,

Provided Methods§

Source

fn new<P, T>(protocol: P, transport: T) -> Arc<Self::Api>
where P: Protocol<Frame = T> + 'static, T: Transport, P::Deserializer: Send,

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§