pub trait PathExt {
const PATH_SEPARATOR: char;
// Required methods
fn relative_to<'s, P: AsRef<Path>>(
&'s self,
ancestor: &P,
) -> Option<RelPath<'s>>;
fn same_fs_as<P: AsRef<Path>>(&self, other: &P) -> bool;
fn rename_safe<P: AsRef<Path>>(&self, target: &P) -> Result<(), FileError>;
fn copy_dir_all<P: AsRef<Path>>(&self, target: &P) -> Result<(), FileError>;
fn join_uri_path(&self, path: &UriPath) -> PathBuf;
fn as_slash_str(&self) -> Cow<'_, str>;
}Required Associated Constants§
const PATH_SEPARATOR: char
Required Methods§
fn relative_to<'s, P: AsRef<Path>>( &'s self, ancestor: &P, ) -> Option<RelPath<'s>>
fn same_fs_as<P: AsRef<Path>>(&self, other: &P) -> bool
fn join_uri_path(&self, path: &UriPath) -> PathBuf
fn as_slash_str(&self) -> Cow<'_, str>
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.