pub trait Responder<Req> {
type Response;
type Error;
// Required method
fn respond(
self,
req: Req
) -> impl Future<Output = Result<Self::Response, Self::Error>>;
// Provided method
fn map(self, res: Self::Response) -> Result<Self::Response, Self::Error>
where Self: Sized { ... }
}Expand description
Make Response with ownership of Req. The Output type is what returns from handler_service function.
Required Associated Types§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.