Trait PathDisplay

Source
pub trait PathDisplay: Debug + AsRef<Path> {
    // Required method
    fn display_path_from(&self, base: impl AsRef<Utf8Path>) -> String;

    // Provided method
    fn display_path_cwd(&self) -> String { ... }
}
Expand description

A way to display a path “nicely”.

Required Methods§

Source

fn display_path_from(&self, base: impl AsRef<Utf8Path>) -> String

Provided Methods§

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<P> PathDisplay for P
where P: AsRef<Path> + Debug,