Trait AsyncRequestTrait

Source
pub trait AsyncRequestTrait: Send + Debug {
    type RequestResult: Sized;

    // Required method
    fn send(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Self::RequestResult> + Send + '_>>;
}
Expand description

Asynchronous HTTP request trait.

Defines the interface for sending asynchronous HTTP requests.

Required Associated Types§

Source

type RequestResult: Sized

The result type of the asynchronous request.

Required Methods§

Source

fn send( &mut self, ) -> Pin<Box<dyn Future<Output = Self::RequestResult> + Send + '_>>

Sends the HTTP request asynchronously.

§Returns
  • Pin<Box<dyn Future<Output = Self::RequestResult> + Send + '_>> - A pinned boxed future representing the asynchronous operation.

Implementors§