pub trait FromRequest: Sized + Send {
const BACKGROUND_TASKS: bool = false;
// Required method
fn from_request(
req: Request,
) -> impl Future<Output = Result<Self, ApiError>> + Send;
// Provided method
fn describe(_op: &mut Operation, _registry: &mut SchemaRegistry) { ... }
}Expand description
Extract a value from the whole request, possibly consuming the body.
Provided Associated Constants§
Sourceconst BACKGROUND_TASKS: bool = false
const BACKGROUND_TASKS: bool = false
Whether extraction needs a request-owned background queue.
Required Methods§
Provided Methods§
Sourcefn describe(_op: &mut Operation, _registry: &mut SchemaRegistry)
fn describe(_op: &mut Operation, _registry: &mut SchemaRegistry)
Document this extractor on op (request body, …).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".