pub struct Router<T> {
pub root: RwLock<Box<Node<T>>>,
pub static_map: RwLock<IndexMap<String, StaticPathMethods<T>>>,
}Expand description
The main router structure.
Fields§
§root: RwLock<Box<Node<T>>>The root node of the routing tree.
static_map: RwLock<IndexMap<String, StaticPathMethods<T>>>Optimized map for purely static routes.
Key: normalized path string.
Value: Map of method string to list of MethodData.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Router<T>
impl<T> !RefUnwindSafe for Router<T>
impl<T> Send for Router<T>where
T: Send,
impl<T> Sync for Router<T>
impl<T> Unpin for Router<T>where
T: Unpin,
impl<T> UnwindSafe for Router<T>where
T: UnwindSafe,
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