rama_http::layer::traffic_writer

Trait RequestWriter

Source
pub trait RequestWriter:
    Send
    + Sync
    + 'static {
    // Required method
    fn write_request(
        &self,
        req: Request,
    ) -> impl Future<Output = ()> + Send + '_;
}
Expand description

A trait for writing http requests.

Required Methods§

Source

fn write_request(&self, req: Request) -> impl Future<Output = ()> + Send + '_

Write the http request.

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.

Implementations on Foreign Types§

Source§

impl RequestWriter for Sender<Request>

Source§

async fn write_request(&self, req: Request)

Source§

impl RequestWriter for UnboundedSender<Request>

Source§

async fn write_request(&self, req: Request)

Implementors§