macro_rules! assert_bag_superbag_as_result { ($a_collection:expr, $b_collection:expr $(,)?) => { ... }; }
Expand description
Assert a bag is a superbag of another.
Pseudocode:
(a_collection โ a_bag) โ (b_collection โ b_bag)
-
If true, return Result
Ok((a_bag, b_bag)). -
Otherwise, return Result
Err(message).
This macro provides the same statements as assert_superbag_other,
except this macro returns a Result, rather than doing a panic.
This macro is useful for runtime checks, such as checking parameters, or sanitizing inputs, or handling different results in different ways.