pub trait OpenApiResponderInner {
// Required method
fn responses(gen: &mut OpenApiGenerator) -> Result<Responses>;
}Expand description
Implementing this trait means that any route returning the implementer can
be marked with #[openapi], and that the route can be documented.
Required Methods§
Sourcefn responses(gen: &mut OpenApiGenerator) -> Result<Responses>
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.
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 OpenApiResponderInner for &str
impl OpenApiResponderInner for &str
Source§impl OpenApiResponderInner for &[u8]
impl OpenApiResponderInner for &[u8]
Source§impl OpenApiResponderInner for Value
impl OpenApiResponderInner for Value
Source§impl OpenApiResponderInner for ()
impl OpenApiResponderInner for ()
Source§impl OpenApiResponderInner for String
impl OpenApiResponderInner for String
Source§impl OpenApiResponderInner for Vec<u8>
impl OpenApiResponderInner for Vec<u8>
Source§impl OpenApiResponderInner for File
impl OpenApiResponderInner for File
Source§impl OpenApiResponderInner for Error
impl OpenApiResponderInner for Error
Source§impl OpenApiResponderInner for NamedFile
impl OpenApiResponderInner for NamedFile
Source§impl OpenApiResponderInner for Redirect
impl OpenApiResponderInner for Redirect
Source§impl OpenApiResponderInner for NoContent
impl OpenApiResponderInner for NoContent
Source§impl OpenApiResponderInner for Status
impl OpenApiResponderInner for Status
Source§impl OpenApiResponderInner for File
impl OpenApiResponderInner for File
Source§impl<'r, 'o, L, R> OpenApiResponderInner for Either<L, R>where
L: OpenApiResponderInner,
R: OpenApiResponderInner,
impl<'r, 'o, L, R> OpenApiResponderInner for Either<L, R>where
L: OpenApiResponderInner,
R: OpenApiResponderInner,
Source§impl<'r, 'o, T, E> OpenApiResponderInner for Result<T, E>where
T: OpenApiResponderInner,
E: OpenApiResponderInner,
impl<'r, 'o, T, E> OpenApiResponderInner for Result<T, E>where
T: OpenApiResponderInner,
E: OpenApiResponderInner,
Source§impl<'r, 'o: 'r, T> OpenApiResponderInner for Cow<'o, T>where
T: OpenApiResponderInner + Clone,
impl<'r, 'o: 'r, T> OpenApiResponderInner for Cow<'o, T>where
T: OpenApiResponderInner + Clone,
Source§impl<E> OpenApiResponderInner for Debug<E>where
E: Debug,
Debug prints the internal value before forwarding to the 500 error catcher.
impl<E> OpenApiResponderInner for Debug<E>where
E: Debug,
Debug prints the internal value before forwarding to the 500 error catcher.
Source§impl<R> OpenApiResponderInner for Capped<R>where
R: OpenApiResponderInner,
impl<R> OpenApiResponderInner for Capped<R>where
R: OpenApiResponderInner,
Source§impl<R> OpenApiResponderInner for Flash<R>where
R: OpenApiResponderInner,
impl<R> OpenApiResponderInner for Flash<R>where
R: OpenApiResponderInner,
Source§impl<R: OpenApiResponderInner> OpenApiResponderInner for (ContentType, R)
impl<R: OpenApiResponderInner> OpenApiResponderInner for (ContentType, R)
Source§impl<R: OpenApiResponderInner> OpenApiResponderInner for (Status, R)
impl<R: OpenApiResponderInner> OpenApiResponderInner for (Status, R)
Source§impl<S> OpenApiResponderInner for ByteStream<S>where
S: Send,
ByteStream is a (potentially infinite) responder. The response Content-Type is set to Binary.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
impl<S> OpenApiResponderInner for ByteStream<S>where
S: Send,
ByteStream is a (potentially infinite) responder. The response Content-Type is set to Binary.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
Source§impl<S> OpenApiResponderInner for ReaderStream<S>
ReaderStream is a (potentially infinite) responder. No Content-Type is set.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
impl<S> OpenApiResponderInner for ReaderStream<S>
ReaderStream is a (potentially infinite) responder. No Content-Type is set.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
Source§impl<S> OpenApiResponderInner for EventStream<S>
EventStream is a (potentially infinite) responder.
The response Content-Type is set to EventStream.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
impl<S> OpenApiResponderInner for EventStream<S>
EventStream is a (potentially infinite) responder.
The response Content-Type is set to EventStream.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
Source§impl<S> OpenApiResponderInner for TextStream<S>where
S: Send,
TextStream is a (potentially infinite) responder. The response Content-Type is set to Text.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
impl<S> OpenApiResponderInner for TextStream<S>where
S: Send,
TextStream is a (potentially infinite) responder. The response Content-Type is set to Text.
The body is unsized, and values are sent as soon as they are yielded by the internal iterator.
Source§impl<T> OpenApiResponderInner for Accepted<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for Accepted<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for BadRequest<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for BadRequest<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for Conflict<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for Conflict<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for Created<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for Created<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for Custom<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for Custom<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for Forbidden<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for Forbidden<T>where
T: OpenApiResponderInner + Send,
Source§impl<T> OpenApiResponderInner for NotFound<T>where
T: OpenApiResponderInner + Send,
impl<T> OpenApiResponderInner for NotFound<T>where
T: OpenApiResponderInner + Send,
Source§impl<T: Serialize + JsonSchema + Send> OpenApiResponderInner for Json<T>
Serializes the wrapped value into JSON. Returns a response with Content-Type JSON and a
fixed-size body with the serialized value. If serialization fails,
an Err of Status::InternalServerError is returned.
impl<T: Serialize + JsonSchema + Send> OpenApiResponderInner for Json<T>
Serializes the wrapped value into JSON. Returns a response with Content-Type JSON and a
fixed-size body with the serialized value. If serialization fails,
an Err of Status::InternalServerError is returned.