pub trait PathErrorExt<T> {
// Required method
fn with_path(self, path: impl Into<PathBuf>) -> Result<T, SsgError>;
}Expand description
Context extension trait for mapping std::io::Error contexts with path info.
§Examples
use ssg::{PathErrorExt, SsgError};
use std::io;
let res: io::Result<()> = Err(io::Error::other("denied"));
let mapped = res.with_path("restricted.txt");
assert!(matches!(mapped, Err(SsgError::Io { .. })));Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".