pub struct Router { /* private fields */ }Expand description
Main router structure that handles HTTP request routing
Implementations§
Source§impl Router
impl Router
Sourcepub fn builder() -> RouterBuilder<IdentityHandlerDecoratorFactory>
pub fn builder() -> RouterBuilder<IdentityHandlerDecoratorFactory>
Creates a new router builder with default wrappers
Sourcepub fn at<'router, 'req>(
&'router self,
path: &'req str,
) -> RouteResult<'router, 'req>
pub fn at<'router, 'req>( &'router self, path: &'req str, ) -> RouteResult<'router, 'req>
Matches a path against the router’s routes
Returns a RouteResult containing matched handlers and path parameters
§Arguments
path- The path to match against
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Router
impl !RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl !UnwindSafe for Router
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