[−][src]Struct thruster_core::route_tree::RouteTree
Fields
root_node: Node<T>
generic_root_node: Node<T>
specific_root_node: Node<T>
Methods
impl<T: 'static + Context + Send> RouteTree<T>
[src]
pub fn new() -> RouteTree<T>
[src]
pub fn update_root_node(&mut self)
[src]
Updates the root_node
of the tree by merging the generic tree into the specific tree. This
is necessary after adding any routes to ensure that the matching functions of the tree are
up to date.
pub fn add_use_node(&mut self, route: &str, middleware: MiddlewareChain<T>)
[src]
pub fn add_route_with_method(
&mut self,
method: &Method,
route: &str,
middleware: MiddlewareChain<T>
)
[src]
&mut self,
method: &Method,
route: &str,
middleware: MiddlewareChain<T>
)
pub fn add_route(&mut self, route: &str, middleware: MiddlewareChain<T>)
[src]
pub fn add_route_tree(&mut self, route: &str, route_tree: RouteTree<T>)
[src]
pub fn match_route(
&self,
route: &str
) -> (HashMap<String, String>, &MiddlewareChain<T>)
[src]
&self,
route: &str
) -> (HashMap<String, String>, &MiddlewareChain<T>)
pub fn match_route_with_params(
&self,
route: &str,
params: HashMap<String, String>
) -> (HashMap<String, String>, &MiddlewareChain<T>)
[src]
&self,
route: &str,
params: HashMap<String, String>
) -> (HashMap<String, String>, &MiddlewareChain<T>)
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for RouteTree<T>
impl<T> Send for RouteTree<T>
impl<T> Sync for RouteTree<T>
impl<T> Unpin for RouteTree<T>
impl<T> !UnwindSafe for RouteTree<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,