PathRebaseable

Trait PathRebaseable 

Source
pub trait PathRebaseable {
    // Required methods
    fn rebase_to_include_base_dir(
        &mut self,
        base_dir: impl AsRef<Path>,
    ) -> Result<(), UnsupportedPathError>;
    fn rebase_to_exclude_base_dir(
        &mut self,
        base_dir: impl AsRef<Path>,
    ) -> Result<(), UnsupportedPathError>;
}

Required Methods§

Source

fn rebase_to_include_base_dir( &mut self, base_dir: impl AsRef<Path>, ) -> Result<(), UnsupportedPathError>

Prefixes path in the type with base_dir.

§Error

Some implementors might not support all paths. For example a implementor requiring rust string compatible paths might return a Err(UnsupportedPathError::new("utf-8")).

Source

fn rebase_to_exclude_base_dir( &mut self, base_dir: impl AsRef<Path>, ) -> Result<(), UnsupportedPathError>

Removes the base_dir prefix.

§Error

Some implementors might not support all paths. For example a implementor requiring rust string compatible paths might return a Err(UnsupportedPathError::new("utf-8")).

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 PathRebaseable for Resource

Source§

impl PathRebaseable for PathBuf

Source§

impl PathRebaseable for IRI

Implementors§