pub trait FromRequest: Sized {
// Required method
fn from_request(
req: Request<Incoming>,
params: &PathParams,
state: &Arc<AppState>,
) -> impl Future<Output = Result<Self, Error>> + Send;
}Expand description
Trait for extractors that consume the request body.
Implement this trait for extractors that need access to the full request, including the body. Only one body-consuming extractor can be used per handler.
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.