[−][src]Struct usher::node::Node
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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,