Macro try_merge
Source macro_rules! try_merge {
($res: expr, $errlog: ident) => { ... };
}
Expand description
Macro to merge_result() and return given ErrorLog if given Result is an Err
Same as
let mut err_log = ErrorLog::<i32, std::num::ParseIntError>::new();
match "a1".parse::<i32>() {
Ok(o) => err_log.set_ok(o),
Err(e) => {
err_log.push_err(e);
return err_log;
}
};
Arguments:
Result
ErrorLog