Skip to main content

PathConvert

Trait PathConvert 

Source
pub trait PathConvert {
    // Required methods
    fn to_cross_path(&self) -> PathResult<CrossPath>;
    fn to_windows_path(&self) -> PathResult<String>;
    fn to_unix_path(&self) -> PathResult<String>;
}
Expand description

Path conversion trait

Extension trait to add conversion methods to string and path types

Required Methods§

Source

fn to_cross_path(&self) -> PathResult<CrossPath>

Convert to CrossPath

§Errors

Returns PathError if conversion fails

Source

fn to_windows_path(&self) -> PathResult<String>

Convert to Windows path

§Errors

Returns PathError if conversion fails

Source

fn to_unix_path(&self) -> PathResult<String>

Convert to Unix path

§Errors

Returns PathError if conversion fails

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PathConvert for Path

Source§

impl PathConvert for str

Implementors§