Macro tracerr::map_from_and_new [−][src]
macro_rules! map_from_and_new {
($e : expr) => { ... };
}
Expand description
Captures a new Frame
in the invocation place and wraps the given error
into a Traced
wrapper containing this Frame
with applying the
required From
conversion for the wrapped error. If the error represents
a Traced
already, then just applies From
conversion and growths its
Trace
with the captured Frame
.
Examples
use tracerr::Traced;
let err: Traced<u8> = tracerr::new!(8);
let err: Traced<u64> = tracerr::map_from_and_new!(err);