[−][src]Function bravery_router::find
pub fn find<'req, T: Clone>(
node: &'req Node<T>,
path: &'req str
) -> FindResult<'req, T>
Find in the radix tree the path and return a FindResult
.
There're some precendence:
- every Static nodes are compared
- then every Regex nodes are compared
- then the Wildcard is applied
Examples
use bravery_router::{create_root_node, add, find}; let mut node = create_root_node(); add(&mut node, "/foo", 1); let find_result = find(&node, "/foo").value.unwrap();