Crate phos

Source
Expand description

phos is a powerful and flexible rust crate for pattern matching and pattern permutation generation. It offers a different approach to pattern matching by providing a Pattern or Matcher struct (similar to a regex expression) that is generic, allowing you to match across any type, not just Strings.

Structsยง

Matcher
A pattern struct used to match against other patterns. This is NOT used to generate permutations.
Pattern
The main difference between Pattern and Matcher is the lack of the Any and Quantifier fragments. Patterns can always be promoted to Matchers, but not vice-versa.