Client

Trait Client 

Source
pub trait Client {
    // Required method
    fn respond<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Body>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn respond_endpoint<'life0, 'life1, 'async_trait, E>(
        &'life0 self,
        endpoint: &'life1 mut E,
    ) -> Pin<Box<dyn Future<Output = Result<EndpointParseResponseOutput<E::ParseResponseOutput, E::RetryReason>>> + Send + 'async_trait>>
       where E: 'async_trait + Endpoint + Send + Sync,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn respond_endpoint_until_done<'life0, 'life1, 'async_trait, E>(
        &'life0 self,
        endpoint: &'life1 mut E,
        max_retry_count: Option<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<E::ParseResponseOutput>> + Send + 'async_trait>>
       where E: 'async_trait + Endpoint + Send + Sync,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn respond<'life0, 'async_trait>( &'life0 self, request: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn respond_endpoint<'life0, 'life1, 'async_trait, E>( &'life0 self, endpoint: &'life1 mut E, ) -> Pin<Box<dyn Future<Output = Result<EndpointParseResponseOutput<E::ParseResponseOutput, E::RetryReason>>> + Send + 'async_trait>>
where E: 'async_trait + Endpoint + Send + Sync, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn respond_endpoint_until_done<'life0, 'life1, 'async_trait, E>( &'life0 self, endpoint: &'life1 mut E, max_retry_count: Option<u8>, ) -> Pin<Box<dyn Future<Output = Result<E::ParseResponseOutput>> + Send + 'async_trait>>
where E: 'async_trait + Endpoint + Send + Sync, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§