1
2
3
4
5
6
7
8
9
10
use std::panic;

/// A trait that enables return tracing for [`Err`] variants of [`Result`].
///
/// [`Err`]: crate::Result::Err
/// [`Result`]: crate::Result
pub trait Trace {
    /// Called during `?` with the code location of the `?` invocation.
    fn trace(&mut self, location: &'static panic::Location<'static>);
}