macro_rules! assert_ready_ne_as_result { ($a:expr, $b:expr $(,)?) => { ... }; }
Expand description
Assert two expressions are Ready(_) and their values are not equal.
Pseudocode:
(a ⇒ Ready(a̅) ⇒ a̅) ≠ (b ⇒ Ready(b̅) ⇒ b̅)
-
If true, return Result
Some(()). -
Otherwise, return Result
Errwith a diagnostic message.
This macro provides the same statements as assert_ready_ne,
except this macro returns a Option, 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.