Trait RelativePath

Source
pub trait RelativePath {
    // Required method
    fn relative_to(&self, source: &Path) -> PathBuf;

    // Provided method
    fn relative_to_cwd(&self) -> PathBuf { ... }
}
Expand description

Extension trait to get the relative path.

Required Methods§

Source

fn relative_to(&self, source: &Path) -> PathBuf

Returns the path to navigate from a source path to self.

Provided Methods§

Source

fn relative_to_cwd(&self) -> PathBuf

Returns the path to navigate from the current directory to self.

Implementors§