pub struct HttpRouteMeta {
pub verb: HttpVerb,
pub path: &'static str,
pub handler: &'static str,
pub summary: Option<&'static str>,
pub description: Option<&'static str>,
pub tags: &'static [&'static str],
pub request_body: Option<SchemaFn>,
pub response: Option<SchemaFn>,
}Expand description
Declarative description of a handler in a controller — verb/path/name plus
the OpenAPI facets #[routes] extracts, so a doc generator (nestrs-openapi)
builds a spec from discovery alone.
Fields§
§verb: HttpVerb§path: &'static str§handler: &'static str§summary: Option<&'static str>§description: Option<&'static str>#[api(tags(...))], else a single-element slice holding the controller
struct name — so routes group by controller in the docs by default.
request_body: Option<SchemaFn>§response: Option<SchemaFn>Trait Implementations§
Source§impl Clone for HttpRouteMeta
impl Clone for HttpRouteMeta
Source§fn clone(&self) -> HttpRouteMeta
fn clone(&self) -> HttpRouteMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpRouteMeta
impl RefUnwindSafe for HttpRouteMeta
impl Send for HttpRouteMeta
impl Sync for HttpRouteMeta
impl Unpin for HttpRouteMeta
impl UnsafeUnpin for HttpRouteMeta
impl UnwindSafe for HttpRouteMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> TowerCompatExt for T
impl<T> TowerCompatExt for T
Source§fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
Converts a tower service to a poem endpoint.