Tracing Result
An ergonomic wrapper making it easy to emit tracing messages on errors.
Example
// Warn and early return
let contents: String = read_to_string.and_warn?;
// Debug and continue
let let contents: = read_to_string.ok_or_debug;
An ergonomic wrapper making it easy to emit tracing messages on errors.
// Warn and early return
let contents: String = fs::read_to_string(&path).and_warn("reading file")?;
// Debug and continue
let let contents: Option<String> = fs::read_to_string(&path).ok_or_debug("reading file");