pub fn with(context: impl Display) -> impl FnOnce(Error) -> ErrorExpand description
Lazily attach a message to an io::Error.
This is particularly useful combined with Result::map_err.
use io_extra::with;
File::open(path).map_err(with("failed to open log file"))?;