macro_rules! assert_any_gt_x_as_result {
($iter:expr, $x:expr $(,)?) => { ... };
}Expand description
Assert any element of an iterable is greater than a value.
Pseudocode:
iter > item
-
If true, return Result
Ok(()). -
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::iter::Iterator.