segments

Function segments 

Source
fn segments(path: &str) -> impl Iterator<Item = (&str, &str)>
Expand description

Fun with iterators.