Struct radix_router::tree::Node [−][src]
pub struct Node<T> { /* fields omitted */ }
Methods
impl<T> Node<T>
[src]
impl<T> Node<T>
pub fn new() -> Node<T>
[src]
pub fn new() -> Node<T>
pub fn add_route(&mut self, path: &str, handle: T)
[src]
pub fn add_route(&mut self, path: &str, handle: T)
addRoute adds a node with the given handle to the path. Not concurrency-safe!
pub fn get_value(&self, path: &str) -> (Option<&T>, Params, bool)
[src]
pub fn get_value(&self, path: &str) -> (Option<&T>, Params, bool)
Returns the handle registered with the given path (key). The values of wildcards are saved to a map. If no handle can be found, a TSR (trailing slash redirect) recommendation is made if a handle exists with an extra (without the) trailing slash for the given path.
pub fn find_case_insensitive_path(
&self,
path: &str,
fix_trailing_slash: bool
) -> (String, bool)
[src]
pub fn find_case_insensitive_path(
&self,
path: &str,
fix_trailing_slash: bool
) -> (String, bool)
Makes a case-insensitive lookup of the given path and tries to find a handler. It can optionally also fix trailing slashes. It returns the case-corrected path and a bool indicating whether the lookup was successful.
Trait Implementations
impl<T: Debug> Debug for Node<T>
[src]
impl<T: Debug> Debug for Node<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Clone> Clone for Node<T>
[src]
impl<T: Clone> Clone for Node<T>