API design: `TracingResult`
The Rust Programming Language Forum
API design: `TracingResult`
So I've finally had enough of typing .map_err(|error| { tracing::warn!("uncooperative yak!", %error); error })?; and decided to do something about it. I currently have the following (nightly only), but would really like ideas and challenges on the overall API at an early stage: .or_warn("uncooperative yak!")?; this relies on a trait extension to Result a custom type which stores a tracing event alongside the Ok(value) or Err(err) variants of a result emitting the event on ? In par...
0 comments
No comments yet.