/// A function that extracts a value from the lazy tree by the specified path.
A function that extracts a value from the lazy tree by the specified path.
A function that extracts a value from the lazy tree by the specified path .
pub fn follow_path<'a>(t: &LazyTree<'a>, path: &[&[u8]]) -> Option<LazyTree<'a>> {
    if path.is_empty() {
        return Some(t.clone());
    }
    match t {
        LazyTree::LazyFork(f) => {
            let node = f.edge(&Label::from(path[0]))?;
            follow_path(&node, &path[1..])
        }
        _ => None,
    }
}
pub fn follow_path < ' a > ( t : & LazyTree < ' a > , path : & [ & [ u8 ] ] ) -> Option < LazyTree < ' a > > { if path . is_empty ( ) { return Some ( t . clone ( ) ) ; } match t { LazyTree :: LazyFork ( f ) => { let node = f . edge ( & Label :: from ( path [ 0 ] ) ) ? ; follow_path ( & node , & path [ 1 .. ] ) } _ => None , } }
A function that extracts a value from the lazy tree by the specified path.
A function that extracts a value from the lazy tree by the specified path .
t
&LazyTree<'a>
path
&[&[u8]]