Trait HttpHandler

Source
pub trait HttpHandler {
    type Error: Format;

    // Required method
    fn http_call<'a, 'd>(
        &'a self,
        request: HttpRequest<'_>,
        out_buffer: &'d mut [u8],
    ) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description

Types which are able to perform an HTTP request to a Web server.

Required Associated Types§

Source

type Error: Format

Error type

Required Methods§

Source

fn http_call<'a, 'd>( &'a self, request: HttpRequest<'_>, out_buffer: &'d mut [u8], ) -> impl Future<Output = Result<(), Self::Error>>

Perform an asynchronous HTTP call

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§