Validixir.Matchers (validixir v1.2.2)
This module contains helper macros to use in matching.
These macros can be used in with and case-statements as well as function headers.
Example:
case validation_result do
success(21) -> ... # matches a success with candidate 21
success() -> ... # matches a success
{:error, failure(:my_error)} -> ... # matches a failure that has the message
# :my_error somewhere in errors
{:error, failure()} -> ... # matches a failure
end