Crate matches2

Source

Macrosยง

assert_matches
Assert that an expression matches a refutable pattern.
debug_assert_matches
Assert that an expression matches a refutable pattern using debug assertions.
matches
Check if an expression matches a refutable pattern.
option_match
Returns Option::Some if the pattern matches with the given value, or Option::None otherwise
unwrap_match
A general version of Option::unwrap for all enum variants.