pub trait HttpRequest {
// Required method
fn request(
&mut self,
req: Request<Body>,
) -> BoxFuture<'_, Result<Response<Vec<u8>>, Error>>;
}Expand description
A trait for providing HTTP capabilities to the StateMachine.
This trait is a wrapper around Hyper, to provide a simple request->response style of API for the state machine to use.
In particular, it’s meant to be easy to mock for tests.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".