pub trait Responder:
Sized
+ Send
+ Sync
+ 'static {
type Error: HttpError;
// Required method
fn respond_to(
self,
_request: &Request,
response: &mut Response,
) -> Result<(), Self::Error>;
}Expand description
Transform a object into a part of HTTP response,always is response body,header,etc.
Required Associated Types§
Required Methods§
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.