pub trait RouterExt {
// Required methods
fn oapi_security(self, security: SecurityRequirement) -> Self;
fn oapi_securities<I>(self, security: I) -> Self
where I: IntoIterator<Item = SecurityRequirement>;
fn oapi_tag(self, tag: impl Into<String>) -> Self;
fn oapi_tags<I, V>(self, tags: I) -> Self
where I: IntoIterator<Item = V>,
V: Into<String>;
}
Expand description
Router extension trait for openapi metadata.
Required Methods§
Sourcefn oapi_security(self, security: SecurityRequirement) -> Self
fn oapi_security(self, security: SecurityRequirement) -> Self
Add security requirement to the router.
All endpoints in the router and it’s descents will inherit this security requirement.
Sourcefn oapi_securities<I>(self, security: I) -> Selfwhere
I: IntoIterator<Item = SecurityRequirement>,
fn oapi_securities<I>(self, security: I) -> Selfwhere
I: IntoIterator<Item = SecurityRequirement>,
Add security requirements to the router.
All endpoints in the router and it’s descents will inherit these security requirements.
Sourcefn oapi_tag(self, tag: impl Into<String>) -> Self
fn oapi_tag(self, tag: impl Into<String>) -> Self
Add tag to the router.
All endpoints in the router and it’s descents will inherit this tag.
Add tags to the router.
All endpoints in the router and it’s descents will inherit these tags.
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.