pub struct Route {
pub method: Method,
pub path: String,
pub handler: RouteHandler,
pub middleware: Vec<String>,
pub name: Option<String>,
}
Expand description
Route definition
Fields§
§method: Method
HTTP method
path: String
Route path
handler: RouteHandler
Route handler
middleware: Vec<String>
Route middleware
name: Option<String>
Route name
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 !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