Skip to main content

Requester

Trait Requester 

Source
pub trait Requester {
    // Required method
    fn request<C: Command>(
        &self,
        cmd: C,
    ) -> impl Future<Output = Result<C::Reply, Error>> + Send;
}
Expand description

Sends commands and awaits typed replies. Mirrors Publisher.

Required Methods§

Source

fn request<C: Command>( &self, cmd: C, ) -> impl Future<Output = Result<C::Reply, Error>> + Send

Send cmd and wait for a typed reply.

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<T: Requester + Sync> Requester for Arc<T>

Source§

fn request<C: Command>( &self, cmd: C, ) -> impl Future<Output = Result<C::Reply, Error>> + Send

Implementors§