pub struct Route<D = ()> {
pub method: Method,
pub handler: Box<dyn Middleware<D> + Send + Sync + 'static>,
/* private fields */
}
Expand description
A Route is the basic data structure that stores both the path
and the handler that gets executed for the route.
The path can contain variable pattern such as user/:userid/invoices
Fields
method: Method
handler: Box<dyn Middleware<D> + Send + Sync + 'static>
Auto Trait Implementations
impl<D = ()> !RefUnwindSafe for Route<D>
impl<D> Send for Route<D>
impl<D> Sync for Route<D>
impl<D> Unpin for Route<D>
impl<D = ()> !UnwindSafe for Route<D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more