PathBufExt

Trait PathBufExt 

Source
pub trait PathBufExt: PathExt {
    // Required methods
    fn without_last(self) -> Self;
    fn test_string(&self) -> String;
    fn starts_with_any(&self, of: &[Utf8PathBuf]) -> bool;
    fn is_ext_any(&self, of: &[&str]) -> bool;
    fn resolve_home_dir(self) -> Result<Utf8PathBuf>;
    fn clean_windows_path(&mut self);
}

Required Methods§

Source

fn without_last(self) -> Self

drops the last path component

Source

fn test_string(&self) -> String

returns a platform independent string suitable for testing

Source

fn starts_with_any(&self, of: &[Utf8PathBuf]) -> bool

Source

fn is_ext_any(&self, of: &[&str]) -> bool

Source

fn resolve_home_dir(self) -> Result<Utf8PathBuf>

Source

fn clean_windows_path(&mut self)

cleaning the unc (illegible \?) start of windows paths. See dunce crate.

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 PathBufExt for Utf8PathBuf

Implementors§