[][src]Struct usher::node::Node

pub struct Node<T> { /* fields omitted */ }

Node structure to represent the internal structure of a router.

A router is simply a Node which doesn't have any parent nodes, which allows for the recursive structure of the tree. Each Node can have a value of the generic type, which is the value returned when routing occurs.

Every Node also has an associated Matcher which is used to test for compatibility when routing (because not every node is applicable on a given segment order). This Matcher is automatically provided to the Node at creation time and is calculated by the routing system.

Lastly, a Node can have child instances to represent the recursive structure of a router. These children are stored in a Vec as there's currently no logical way to index them into a more suitable structure. If a Node has no children, the containing vector does not require any memory allocation. Any memory will be allocated lazily, and should remain minimal in most standard cases (as it depends on the allocator in use).

Auto Trait Implementations

impl<T> !RefUnwindSafe for Node<T>

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

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

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

impl<T> !UnwindSafe for Node<T>

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, 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.