[][src]Trait rocket_okapi::request::OpenApiFromData

pub trait OpenApiFromData<'r>: FromData<'r> {
    fn request_body(gen: &mut OpenApiGenerator) -> Result<RequestBody>;
}

This trait means that the implementer can be used as a FromData request guard, and that this can also be documented.

Required methods

fn request_body(gen: &mut OpenApiGenerator) -> Result<RequestBody>

Return a RequestBody containing the information required to document the FromData for implementer.

Loading content...

Implementations on Foreign Types

impl<'a, T: JsonSchema + Deserialize<'a>> OpenApiFromData<'a> for Json<T>[src]

impl<'a, T: OpenApiFromData<'a> + 'a> OpenApiFromData<'a> for StdResult<T, T::Error>[src]

impl<'a, T: OpenApiFromData<'a> + 'a> OpenApiFromData<'a> for Option<T>[src]

Loading content...

Implementors

Loading content...