Trait ParseDot

Source
pub trait ParseDot {
    // Required methods
    fn parse_dot(&self) -> Result<Cow<'_, Path>>;
    fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>;
}
Expand description

Let Path and PathBuf have parse_dot method.

Required Methods§

Source

fn parse_dot(&self) -> Result<Cow<'_, Path>>

Remove dots in the path and create a new PathBuf instance on demand.

Source

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

Remove dots in the path and create a new PathBuf instance on demand. It gets the current working directory as the second argument.

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.

Implementations on Foreign Types§

Source§

impl ParseDot for Path

Source§

fn parse_dot(&self) -> Result<Cow<'_, Path>>

Source§

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

Source§

impl ParseDot for PathBuf

Source§

fn parse_dot(&self) -> Result<Cow<'_, Path>>

Source§

fn parse_dot_from(&self, cwd: impl AsRef<Path>) -> Result<Cow<'_, Path>>

Implementors§