Skip to main content

PathToStringExt

Trait PathToStringExt 

Source
pub trait PathToStringExt {
    // Required method
    fn path_to_string(&self) -> Result<String>;
}
Expand description

Extension trait for getting a String from a Path.

Required Methods§

Source

fn path_to_string(&self) -> Result<String>

Convert the path to a string if it is valid UTF-8, and return an error otherwise.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PathToStringExt for Path

Source§

impl PathToStringExt for PathBuf

Implementors§