macro_rules! assert_set_eq_as_result {
($a_collection:expr, $b_collection:expr $(,)?) => { ... };
}Expand description
Assert a set is equal to another.
Pseudocode:
(a_collection ⇒ a_set) = (b_collection ⇒ b_set)
-
If true, return Result
Ok((a_set, b_set)). -
Otherwise, return Result
Err(message).
This macro is useful for runtime checks, such as checking parameters, or sanitizing inputs, or handling different results in different ways.
This implementation uses ::std::collections::BTreeSet to count items and sort them.