pub struct RouteParser<T: 'static + Context + Send> {
pub route_tree: RouteTree<T>,
pub shortcuts: HashMap<String, MiddlewareChain<T>>,
}Fields§
§route_tree: RouteTree<T>§shortcuts: HashMap<String, MiddlewareChain<T>>Implementations§
Source§impl<T: Context + Send> RouteParser<T>
impl<T: Context + Send> RouteParser<T>
pub fn new() -> RouteParser<T>
pub fn add_method_agnostic_middleware( &mut self, route: &str, middleware: MiddlewareChain<T>, )
pub fn add_route(&mut self, route: &str, middleware: MiddlewareChain<T>)
pub fn optimize(&mut self)
pub fn match_route(&self, route: &str) -> MatchedRoute<'_, T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RouteParser<T>
impl<T> !RefUnwindSafe for RouteParser<T>
impl<T> Send for RouteParser<T>
impl<T> Sync for RouteParser<T>
impl<T> Unpin for RouteParser<T>
impl<T> !UnwindSafe for RouteParser<T>
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