[][src]Struct path_tree::PathTree

pub struct PathTree<T>(_);

A path tree.

Implementations

impl<T> PathTree<T>[src]

pub fn new() -> Self[src]

Creates a new tree with a root node.

The root node is a static node with /.

pub fn insert(&mut self, path: &str, data: T) -> &mut Self[src]

Inserts a path and data into tree.

pub fn find<'a>(
    &'a self,
    path: &'a str
) -> Option<(&'a T, Vec<(&'a str, &'a str)>)>
[src]

Returns a reference to the node data and params corresponding to the path.

Trait Implementations

impl<T: Clone> Clone for PathTree<T>[src]

impl<T: Debug> Debug for PathTree<T>[src]

impl<T> Default for PathTree<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PathTree<T> where
    T: RefUnwindSafe

impl<T> Send for PathTree<T> where
    T: Send

impl<T> Sync for PathTree<T> where
    T: Sync

impl<T> Unpin for PathTree<T> where
    T: Unpin

impl<T> UnwindSafe for PathTree<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.