/// Iterate over all components in path.
Iterate over all components in path.
Iterate over all components in path .
pub fn as_components(&self) -> impl Iterator<Item = &'_ PathSegment> + '_ {
        let mut first = Some(&self.first);
        let mut it = self.rest.iter();
        std::iter::from_fn(move || {
            if let Some(first) = first.take() {
                return Some(first);
            }
            Some(&it.next()?.1)
        })
    }
pub fn as_components ( & self ) -> impl Iterator < Item = & ' _ PathSegment > + ' _ { let mut first = Some ( & self . first ) ; let mut it = self . rest . iter ( ) ; std :: iter :: from_fn ( move | | { if let Some ( first ) = first . take ( ) { return Some ( first ) ; } Some ( & it . next ( ) ? . 1 ) } ) }
Iterate over all components in path.
Iterate over all components in path .
&self