pub trait PathOperations {
// Required methods
fn split_path(&self, path: &str) -> Vec<String>;
fn join_path(&self, components: &[String]) -> String;
fn parent_path(&self, path: &str) -> Option<String>;
fn last_component(&self, path: &str) -> Option<String>;
}Expand description
Path operations for hierarchical data.
Required Methods§
Sourcefn split_path(&self, path: &str) -> Vec<String>
fn split_path(&self, path: &str) -> Vec<String>
Split a path into components.
Sourcefn parent_path(&self, path: &str) -> Option<String>
fn parent_path(&self, path: &str) -> Option<String>
Get parent path from a path.
Sourcefn last_component(&self, path: &str) -> Option<String>
fn last_component(&self, path: &str) -> Option<String>
Get the last component of a path.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".