[][src]Trait rocket_okapi::response::OpenApiResponder

pub trait OpenApiResponder<'r>: Responder<'r> {
    fn responses(gen: &mut OpenApiGenerator) -> Result<Responses>;
}

Implementing this trait means that any route returning the implementer can be marked with #[openapi], and that the route can be documented.

Required methods

fn responses(gen: &mut OpenApiGenerator) -> Result<Responses>

Create the responses type, which is a list of responses that can be rendered in openapi.json format.

Loading content...

Implementations on Foreign Types

impl<T: JsonSchema + Serialize, '_> OpenApiResponder<'_> for Json<T>[src]

impl<'_> OpenApiResponder<'_> for JsonValue[src]

impl<'_> OpenApiResponder<'_> for String[src]

impl<'r> OpenApiResponder<'r> for &'r str[src]

impl<'_> OpenApiResponder<'_> for Vec<u8>[src]

impl<'r> OpenApiResponder<'r> for Response<'r>[src]

impl<'r> OpenApiResponder<'r> for &'r [u8][src]

impl<'_> OpenApiResponder<'_> for ()[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Option<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Accepted<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Created<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for BadRequest<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Unauthorized<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Forbidden<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for NotFound<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Conflict<T>[src]

impl<'_> OpenApiResponder<'_> for NoContent[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Css<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Html<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for JavaScript<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Json<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for MsgPack<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Plain<T>[src]

impl<'r, T: OpenApiResponder<'r>> OpenApiResponder<'r> for Xml<T>[src]

impl<'r, T: OpenApiResponder<'r>, E: Debug> OpenApiResponder<'r> for StdResult<T, E>[src]

impl<'r, T: OpenApiResponder<'r>, E: Responder<'r> + Debug> OpenApiResponder<'r> for StdResult<T, E>[src]

impl<'r, T: OpenApiResponder<'r>, E: OpenApiResponder<'r> + Debug> OpenApiResponder<'r> for StdResult<T, E>[src]

Loading content...

Implementors

Loading content...