Skip to main content

PathExt

Trait PathExt 

Source
pub trait PathExt
where Self: AsRef<Path>,
{ // Required methods fn show(&self) -> String; fn strip_prefix(&self, _: impl AsRef<Path>) -> Result<&Path>; }
Expand description

Extension trait for Path

Required Methods§

Source

fn show(&self) -> String

Show the colored path

Source

fn strip_prefix(&self, _: impl AsRef<Path>) -> Result<&Path>

Like Path::strip_prefix, but includes an informative error message

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: AsRef<Path>> PathExt for T