pub struct Route {
pub method: Option<HttpMethod>,
pub path: Option<String>,
pub tags: Vec<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub deprecated: bool,
}Expand description
HTTP route metadata for a procedure.
Carries method, path, tags, and OpenAPI documentation fields.
Fields§
§method: Option<HttpMethod>§path: Option<String>§summary: Option<String>§description: Option<String>§deprecated: boolImplementations§
Source§impl Route
impl Route
pub fn new() -> Self
pub fn get(path: impl Into<String>) -> Self
pub fn post(path: impl Into<String>) -> Self
pub fn put(path: impl Into<String>) -> Self
pub fn delete(path: impl Into<String>) -> Self
pub fn patch(path: impl Into<String>) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
pub fn summary(self, summary: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn deprecated(self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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