pub trait PathExt {
// Required methods
fn relative_to(&self, to: impl AsRef<Utf8Path>) -> Option<Utf8PathBuf>;
fn rebase(
&self,
src_root: &Utf8Path,
dest_root: &Utf8Path
) -> Result<Utf8PathBuf>;
fn unbase(&self, base: &Utf8Path) -> Result<Utf8PathBuf>;
}Required Methods§
sourcefn relative_to(&self, to: impl AsRef<Utf8Path>) -> Option<Utf8PathBuf>
fn relative_to(&self, to: impl AsRef<Utf8Path>) -> Option<Utf8PathBuf>
converts this absolute path to relative if the start matches
sourcefn rebase(
&self,
src_root: &Utf8Path,
dest_root: &Utf8Path
) -> Result<Utf8PathBuf>
fn rebase( &self, src_root: &Utf8Path, dest_root: &Utf8Path ) -> Result<Utf8PathBuf>
removes the src_root from the path and adds the dest_root
sourcefn unbase(&self, base: &Utf8Path) -> Result<Utf8PathBuf>
fn unbase(&self, base: &Utf8Path) -> Result<Utf8PathBuf>
removes base from path (making sure they match)
Object Safety§
This trait is not object safe.