Skip to main content

IoResultExt

Trait IoResultExt 

Source
pub trait IoResultExt<T> {
    // Required method
    fn io_context(self, action: &'static str, path: &Path) -> Result<T, Error>;
}
Expand description

Attaches the path and the attempted operation to an I/O failure.

Required Methods§

Source

fn io_context(self, action: &'static str, path: &Path) -> Result<T, Error>

Converts an I/O error into Error::Io.

§Errors

Returns Error::Io whenever the receiver is an error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> IoResultExt<T> for Result<T, Error>

Source§

fn io_context(self, action: &'static str, path: &Path) -> Result<T, Error>

Implementors§