Skip to main content

PathResultExt

Trait PathResultExt 

Source
pub trait PathResultExt<T> {
    // Required method
    fn with_path<P>(self, action: &'static str, path: P) -> Result<T>
       where P: AsRef<Path>;
}
Expand description

Adds file-system path context to fallible operations.

Required Methods§

Source

fn with_path<P>(self, action: &'static str, path: P) -> Result<T>
where P: AsRef<Path>,

Attach an operation label and the relevant path while preserving the original error as source.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, E> PathResultExt<T> for Result<T, E>
where E: Error + Send + Sync + 'static,

Source§

fn with_path<P>(self, action: &'static str, path: P) -> Result<T>
where P: AsRef<Path>,

Implementors§