[−][src]Struct turbofish::router::Node
A node in radix tree ordered by priority priority is just the number of values registered in sub nodes (children, grandchildren, and so on..).
Implementations
impl<V> Node<V>
[src]
pub fn add_route(&mut self, path: &str, value: V)
[src]
add_route adds a node with the given value to the path.
pub fn get_value(&self, path: &str) -> Result<RouteLookup<'_, V>, bool>
[src]
Returns the value registered with the given path (key). The values of wildcards are saved to a map. If no value can be found, a TSR (trailing slash redirect) recommendation is made if a value 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
) -> Option<String>
[src]
&self,
path: &str,
fix_trailing_slash: bool
) -> Option<String>
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
Auto Trait Implementations
impl<V> RefUnwindSafe for Node<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for Node<V> where
V: Send,
V: Send,
impl<V> Sync for Node<V> where
V: Sync,
V: Sync,
impl<V> Unpin for Node<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for Node<V> where
V: UnwindSafe,
V: UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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.
pub 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>,