Skip to main content

DocRequestBody

Trait DocRequestBody 

Source
pub trait DocRequestBody {
    // Required method
    fn describe(op: &mut Operation);
}
Expand description

Contributes the request body schema to an operation.

Only one extractor per handler should implement this — a handler with two request bodies is ill-formed.

Required Methods§

Source

fn describe(op: &mut Operation)

Set op.request_body to describe the body this extractor consumes.

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.

Implementations on Foreign Types§

Source§

impl<T: ToSchema + PartialSchema + 'static> DocRequestBody for Json<T>

Implementors§