[−][src]Macro join::try_join
Use to combine results. It transposes tuple of Result
s/Option
s into Result
/Option
of tuple or single Result
/Option
in
case of 1 branch.
Example:
extern crate join; use join::try_join; fn main() { let product = try_join! { Ok::<_,()>(2) |> |v| v + 2, Ok::<_,()>(3), Ok::<_,()>(4), map => |a, b, c| a * b * c }.unwrap(); assert_eq!(product, 48); }