Trait typed_path::Utf8Components 
source · pub trait Utf8Components<'a>: AsRef<str> + Clone + Debug + PartialEq + Eq + PartialOrd + Ord + Iterator<Item = Self::Component> + DoubleEndedIterator<Item = Self::Component> + FusedIterator + Sized + Sealed {
    type Component: Utf8Component<'a>;
    // Required methods
    fn as_str(&self) -> &'a str;
    fn is_absolute(&self) -> bool;
    fn has_root(&self) -> bool;
}Expand description
Interface of an iterator over a collection of Utf8Components
Required Associated Types§
sourcetype Component: Utf8Component<'a>
 
type Component: Utf8Component<'a>
Type of Utf8Component iterated over
Required Methods§
sourcefn as_str(&self) -> &'a str
 
fn as_str(&self) -> &'a str
Extracts a slice corresponding to the portion of the path remaining for iteration
sourcefn is_absolute(&self) -> bool
 
fn is_absolute(&self) -> bool
Reports back whether the iterator represents an absolute path
The definition of an absolute path can vary:
- 
On Unix, a path is absolute if it starts with the root, so is_absoluteandhas_rootare equivalent.
- 
On Windows, a path is absolute if it has a prefix and starts with the root: c:\windowsis absolute, whilec:tempand\tempare not.
sourcefn has_root(&self) -> bool
 
fn has_root(&self) -> bool
Returns true if the iterator represents a path that has a root.
The definition of what it means for a path to have a root can vary:
- 
On Unix, a path has a root if it begins with /.
- 
On Windows, a path has a root if it: - has no prefix and begins with a separator, e.g., \windows
- has a prefix followed by a separator, e.g., c:\windowsbut notc:windows
- has any non-disk prefix, e.g., \\server\share
 
- has no prefix and begins with a separator, e.g., 
Object Safety§
This trait is not object safe.