View Source Matcha.Pattern (Matcha v0.1.10)

About patterns.

Link to this section Summary

Link to this section Types

@type t() :: %Matcha.Pattern{source: Matcha.Source.pattern()}

Link to this section Functions

Link to this function

filter(pattern, enumerable)

View Source
@spec filter(t(), Enumerable.t()) :: Enumerable.t()
@spec match!(t(), term()) :: term() | no_return()
@spec match?(t(), term()) :: boolean()
@spec source(t()) :: Matcha.Source.pattern()
Link to this function

to_spec(context \\ Matcha.Context.Match, pattern)

View Source
@spec to_spec(context :: Matcha.Context.t(), t()) ::
  {:ok, Matcha.Spec.t()} | {:error, Matcha.Error.problems()}
@spec validate(t()) :: {:ok, t()} | {:error, Matcha.Error.problems()}
@spec validate!(t()) :: t() | no_return()