pub struct Operable {
pub type_name: &'static str,
pub id: &'static str,
pub group: Option<&'static str>,
pub summary: Option<&'static str>,
pub description: Option<&'static str>,
pub deprecated: bool,
pub security: Option<&'static str>,
pub parameters: &'static Lazy<Vec<ParamConstructor>>,
pub responses: &'static Lazy<Box<dyn Fn() -> Responses + Sync + Send + 'static>>,
}Available on crate feature
openapi only.Expand description
Everything the #[api] macro records about one handler, collected via inventory.
Fields§
§type_name: &'static strFully qualified name of the handler function, used to match a route to its Operable.
id: &'static strThe operation id.
group: Option<&'static str>Tag the operation is grouped under.
summary: Option<&'static str>Explicit summary; when absent it is derived from the id in Title Case.
description: Option<&'static str>Description, taken from the handler’s doc comment.
deprecated: boolWhether the operation is marked deprecated.
security: Option<&'static str>Name of a security scheme this operation requires.
parameters: &'static Lazy<Vec<ParamConstructor>>One constructor per handler argument.
responses: &'static Lazy<Box<dyn Fn() -> Responses + Sync + Send + 'static>>Builds the operation’s responses from the handler’s return type.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Operable
impl !UnwindSafe for Operable
impl Freeze for Operable
impl Send for Operable
impl Sync for Operable
impl Unpin for Operable
impl UnsafeUnpin for Operable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more