pub trait Path {
type ComponentsIter<'a>: DoubleEndedIterator<Item = &'a str>
where Self: 'a;
// Required method
fn as_components(&self) -> Result<Self::ComponentsIter<'_>>;
}Expand description
Absolute path of an item.
Either a slice of path components or a string with /-separated components.
A leading slash is required for a string path, other than that the path can
be empty.
Required Associated Types§
Sourcetype ComponentsIter<'a>: DoubleEndedIterator<Item = &'a str>
where
Self: 'a
type ComponentsIter<'a>: DoubleEndedIterator<Item = &'a str> where Self: 'a
Iterator over the components of the path.
Required Methods§
Sourcefn as_components(&self) -> Result<Self::ComponentsIter<'_>>
fn as_components(&self) -> Result<Self::ComponentsIter<'_>>
An iterator over this path’s components.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.