pub trait ExpandPaths {
// Required method
fn get_expanded_path(self) -> Option<PathBuf>;
}Expand description
Trait for expanding paths in a shell-like way.
Required Methods§
Sourcefn get_expanded_path(self) -> Option<PathBuf>
fn get_expanded_path(self) -> Option<PathBuf>
Expands path in a shell-like way
Takes ownership of the implementor and returns Some(PathBuf) if
self can successfully expand the path; otherwise, returns None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ExpandPaths for PathBuf
impl ExpandPaths for PathBuf
Source§fn get_expanded_path(self) -> Option<Self>
fn get_expanded_path(self) -> Option<Self>
Expands path in a shell-like way
Returns None if fails to retrieve the user’s home dir.