pub trait SegmentedPath<S: PathSegment, R: PathSegmentRef<S> + ?Sized>: Clone + Eq + Hash + Debug {
    // Required methods
    fn segments(&self) -> Box<dyn Iterator<Item = &R> + '_>;
    fn parent_child_segments(
        &self
    ) -> (Box<dyn Iterator<Item = &R> + '_>, Option<&R>);
}
Expand description

Decomposition of a path into segments.

Required Methods§

source

fn segments(&self) -> Box<dyn Iterator<Item = &R> + '_>

Iterate over all path segments.

All segments are guaranteed to be non-empty.

source

fn parent_child_segments( &self ) -> (Box<dyn Iterator<Item = &R> + '_>, Option<&R>)

Split the path into parent segments and the last child segment.

The returned iterator excludes the last segment that is included by Self::segments().

Object Safety§

This trait is not object safe.

Implementors§