Trait SendRequest

Source
pub trait SendRequest {
    type Response;
    type Error;

    // Required method
    fn send<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

A trait for abstracting sending requests between APIs.

Required Associated Types§

Source

type Response

The type of the response.

Source

type Error

The type of the error.

Required Methods§

Source

fn send<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Sends the request, returning whether or not there was an error with the response.

Implementors§