pub trait WrapIoError<PathType: PathType + ?Sized>: Sized + Sealed {
type Output;
// Required method
fn wrap_io_error(
self,
get_path: impl FnOnce() -> PathType::OwnedPath,
) -> Result<Self::Output, PathType::OwnedPath>;
// Provided method
fn wrap_io_error_with(
self,
path: &PathType,
) -> Result<Self::Output, PathType::OwnedPath> { ... }
}Expand description
A trait for wrapping IO errors with the path where they happened, turning std::io::Results into crate::error::Results.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.