pub trait PathBufExt {
// Required methods
fn from_lx(path: impl AsRef<LxStr>) -> Result<PathBuf>;
fn push_lx(&mut self, path: impl AsRef<LxStr>) -> Result<()>;
}
Expand description
Extensions to PathBuf
to convert Unix-style paths to a native path.
§Windows
Paths are converted to native by switching the separators from / to \, and by escaping characters that are not legal in NTFS file names (such as \, :, and others) by mapping them into a private unicode range (0xf000).
This is primarily useful for relative paths which will be passed to the methods of LxVolume
.
While you can translate absolute paths, the result will have no drive letter.
§Unix
Paths are already native so no conversion is performed.
Required Methods§
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.