PurePath

Trait PurePath 

Source
pub trait PurePath: Sized {
    // Required methods
    fn parent(&self) -> Option<Self>;
    fn file_name(&self) -> Option<&str>;
    fn join_in_place(&mut self, path: &Self);
    fn join(&self, path: &Self) -> Self;
    fn is_absolute(&self) -> bool;
    fn components(&self) -> impl DoubleEndedIterator<Item = Component<'_>>;
}
Expand description

A pure path.

Required Methods§

Source

fn parent(&self) -> Option<Self>

Returns the parent of the path.

Source

fn file_name(&self) -> Option<&str>

Returns the last component of the path, if there is one.

Source

fn join_in_place(&mut self, path: &Self)

Joins the given path in place.

Source

fn join(&self, path: &Self) -> Self

Joins the given path.

Source

fn is_absolute(&self) -> bool

Returns whether the path is absolute.

Source

fn components(&self) -> impl DoubleEndedIterator<Item = Component<'_>>

Returns the components of the path.

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.

Implementors§

Source§

impl<'a> PurePath for UnifiedPath<'a>

Source§

impl<P: ParsablePath + Sized + AsRef<str> + for<'a> From<&'a str> + From<String>> PurePath for P