macro_rules! facility_match_values {
($current:expr, $ok_value:pat, $nok_value:pat) => { ... };
($current:expr, $ok_value:pat, $nok_value:pat, $msg:literal) => { ... };
}Expand description
Match the specific values.
§Arguments
$current- Current value for matching these values$ok_value- Awaiting value for considering this match valid.$nok_value- Awaiting value for considering this match not valid.$msg- (Optional) Specific match message error.
§Return
The Result<(), &'static str> value.
§Examples
use utmt::facility_match_values;
assert!(facility_match_values!(None::<i32>, None, Some(_)).is_ok())§Notes
This macro is using as support for other macros and do not panic!() if the internal matching test failed.