Skip to main content

ClientCaller

Trait ClientCaller 

Source
pub trait ClientCaller: Send {
    type Facts: ClientFacts;

    // Required method
    fn send_req(
        &self,
        task: <Self::Facts as ClientFacts>::Task,
    ) -> impl Future<Output = ()> + Send;

    // Provided method
    fn get_codec(&self) -> <Self::Facts as ClientFacts>::Codec { ... }
}
Expand description

A trait to support sending request task in async text, for all router and connection pool implementations

Required Associated Types§

Required Methods§

Source

fn send_req( &self, task: <Self::Facts as ClientFacts>::Task, ) -> impl Future<Output = ()> + Send

Provided Methods§

Source

fn get_codec(&self) -> <Self::Facts as ClientFacts>::Codec

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<C: ClientCaller + Send + Sync> ClientCaller for Arc<C>

Source§

type Facts = <C as ClientCaller>::Facts

Source§

async fn send_req(&self, task: <Self::Facts as ClientFacts>::Task)

Implementors§