[][src]Macro tracerr::map_from_and_wrap

macro_rules! map_from_and_wrap {
    () => { ... };
    ($from:ty) => { ... };
    (=> $to:ty) => { ... };
    ($from:ty => $to:ty) => { ... };
}

Provides a closure, which captures new Frame in the invocation place for the given Traced wrapper and applies required From implementation for the wrapped error.

Examples

use tracerr::Traced;

let res: Result<(), Traced<u8>> = Err(tracerr::new!(7));
let err: Traced<u64> =
    res.map_err(tracerr::map_from_and_wrap!()).unwrap_err();