pub struct RouteDocumentation {
pub method: String,
pub path: String,
pub summary: Option<String>,
pub description: Option<String>,
pub tags: Vec<String>,
pub responses: Vec<RouteResponseDocumentation>,
pub requires_auth: bool,
pub required_roles: Vec<String>,
}Fields§
§method: String§path: String§summary: Option<String>§description: Option<String>§responses: Vec<RouteResponseDocumentation>§requires_auth: bool§required_roles: Vec<String>Implementations§
Source§impl RouteDocumentation
impl RouteDocumentation
pub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
pub fn with_summary(self, summary: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_responses(self, responses: Vec<RouteResponseDocumentation>) -> Self
pub fn requires_auth(self) -> Self
pub fn with_required_roles<I, S>(self, roles: I) -> Self
Trait Implementations§
Source§impl Clone for RouteDocumentation
impl Clone for RouteDocumentation
Source§fn clone(&self) -> RouteDocumentation
fn clone(&self) -> RouteDocumentation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteDocumentation
impl Debug for RouteDocumentation
Source§impl Default for RouteDocumentation
impl Default for RouteDocumentation
Source§fn default() -> RouteDocumentation
fn default() -> RouteDocumentation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RouteDocumentation
impl<'de> Deserialize<'de> for RouteDocumentation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RouteDocumentation
impl RefUnwindSafe for RouteDocumentation
impl Send for RouteDocumentation
impl Sync for RouteDocumentation
impl Unpin for RouteDocumentation
impl UnsafeUnpin for RouteDocumentation
impl UnwindSafe for RouteDocumentation
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