pub fn children_with_depth(i: usize, depth: usize) -> Option<(usize, usize)>
Expand description

Returns both children of a node, with a depth.

Examples

assert_eq!(flat_tree::children_with_depth(0, 0), None);
assert_eq!(flat_tree::children_with_depth(1, 1), Some((0, 2)));
assert_eq!(flat_tree::children_with_depth(3, 2), Some((1, 5)));
assert_eq!(flat_tree::children_with_depth(9, 1), Some((8, 10)));