HttpClientExt

Trait HttpClientExt 

Source
pub trait HttpClientExt: WasmCompatSend + WasmCompatSync {
    // Required methods
    fn send<T, U>(
        &self,
        req: Request<T>,
    ) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<U, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
       where T: Into<Bytes> + WasmCompatSend,
             U: From<Bytes> + WasmCompatSend + 'static;
    fn send_streaming<T>(
        &self,
        req: Request<T>,
    ) -> impl Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
       where T: Into<Bytes>;
}

Required Methods§

Source

fn send<T, U>( &self, req: Request<T>, ) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<U, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
where T: Into<Bytes> + WasmCompatSend, U: From<Bytes> + WasmCompatSend + 'static,

Source

fn send_streaming<T>( &self, req: Request<T>, ) -> impl Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
where T: Into<Bytes>,

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 HttpClientExt for Client

Source§

fn send<T, U>( &self, req: Request<T>, ) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<U, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
where T: Into<Bytes>, U: From<Bytes> + WasmCompatSend,

Source§

fn send_streaming<T>( &self, req: Request<T>, ) -> impl Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
where T: Into<Bytes>,

Implementors§