pub trait Simplified {
// Required methods
fn simplified(&self) -> &Path;
fn simplified_display(&self) -> impl Display;
fn simple_canonicalize(&self) -> Result<PathBuf>;
fn user_display(&self) -> impl Display;
fn user_display_from(&self, base: impl AsRef<Path>) -> impl Display;
fn portable_display(&self) -> impl Display;
}Required Methods§
Sourcefn simplified(&self) -> &Path
fn simplified(&self) -> &Path
Simplify a Path.
On Windows, this will strip the \\?\ prefix from paths. On other platforms, it’s a no-op.
Sourcefn simplified_display(&self) -> impl Display
fn simplified_display(&self) -> impl Display
Render a Path for display.
On Windows, this will strip the \\?\ prefix from paths. On other platforms, it’s
equivalent to std::path::Display.
Sourcefn simple_canonicalize(&self) -> Result<PathBuf>
fn simple_canonicalize(&self) -> Result<PathBuf>
Canonicalize a path without a \\?\ prefix on Windows.
For a path that can’t be canonicalized (e.g. on network drive or RAM drive on Windows),
this will return the absolute path if it exists.
Sourcefn user_display(&self) -> impl Display
fn user_display(&self) -> impl Display
Render a Path for user-facing display.
Like [simplified_display], but relativizes the path against the current working directory.
Sourcefn user_display_from(&self, base: impl AsRef<Path>) -> impl Display
fn user_display_from(&self, base: impl AsRef<Path>) -> impl Display
Sourcefn portable_display(&self) -> impl Display
fn portable_display(&self) -> impl Display
Render a Path for user-facing display using a portable representation.
Like [user_display], but uses a portable representation for relative paths.
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.