pub trait HttpServiceRaw:
Send
+ Sync
+ 'static {
// Required methods
fn request_raw<'a>(
&'a self,
route: &'a str,
req: &'a HttpRequest,
body: &'a mut dyn HttpRead,
) -> Pin<Box<dyn Future<Output = HttpResult> + Send + 'a>>;
fn filter_raw(&self, route: &str, req: &HttpRequest) -> HttpResult<()>;
}Expand description
Dyn version of HttpService
The raw version is required to overcome the ugliness of dyn Future signatures
Use it to call the service, and use HttpService to implement it.
Required Methods§
Sourcefn request_raw<'a>(
&'a self,
route: &'a str,
req: &'a HttpRequest,
body: &'a mut dyn HttpRead,
) -> Pin<Box<dyn Future<Output = HttpResult> + Send + 'a>>
fn request_raw<'a>( &'a self, route: &'a str, req: &'a HttpRequest, body: &'a mut dyn HttpRead, ) -> Pin<Box<dyn Future<Output = HttpResult> + Send + 'a>>
Serve the request (dyn version)
Sourcefn filter_raw(&self, route: &str, req: &HttpRequest) -> HttpResult<()>
fn filter_raw(&self, route: &str, req: &HttpRequest) -> HttpResult<()>
Checks if request is valid (dyn version)