macro_rules! assert_status_code_value_le_as_result { ($a_process:expr, $b_process:expr $(,)?) => { ... }; }
Expand description
Assert a status code value is less than or equal to another.
Pseudocode:
a ⇒ status ⇒ code ⇒ value ≤ b ⇒ status ⇒ code ⇒ value
-
If true, return Result
Ok((a value, b value))). -
Otherwise, return Result
Err(message).
This macro provides the same statements as assert_,
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.