Trait im_pathtree::SegmentedPath
source · 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§
sourcefn segments(&self) -> Box<dyn Iterator<Item = &R> + '_>
fn segments(&self) -> Box<dyn Iterator<Item = &R> + '_>
Iterate over all path segments.
All segments are guaranteed to be non-empty.
sourcefn parent_child_segments(
&self
) -> (Box<dyn Iterator<Item = &R> + '_>, Option<&R>)
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.