pub struct RouteDefinition {
pub method: HttpMethod,
pub path: String,
pub handler: String,
pub middleware: Vec<String>,
pub description: Option<String>,
}
Expand description
Route definition for module routing
Fields§
§method: HttpMethod
§path: String
§handler: String
§middleware: Vec<String>
§description: Option<String>
Implementations§
Source§impl RouteDefinition
impl RouteDefinition
pub fn new( method: HttpMethod, path: impl Into<String>, handler: impl Into<String>, ) -> Self
pub fn with_middleware(self, middleware: Vec<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for RouteDefinition
impl Clone for RouteDefinition
Source§fn clone(&self) -> RouteDefinition
fn clone(&self) -> RouteDefinition
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 moreAuto Trait Implementations§
impl Freeze for RouteDefinition
impl RefUnwindSafe for RouteDefinition
impl Send for RouteDefinition
impl Sync for RouteDefinition
impl Unpin for RouteDefinition
impl UnwindSafe for RouteDefinition
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