pub trait AsPath {
// Required method
fn as_path(&self) -> Path<'_>;
}Expand description
A trait for types that can be converted to a Path.
When providing a String/str, any leading/trailing slashes are trimmed and multiple consecutive slashes are collapsed. When already a Path, normalization is skipped and the underlying buffer is reused without copying.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".