View Source Vx.Constraint (Vx v0.1.0)

A constraint for a Vx.Type. You can add a constraint to a type using Vx.Type.constrain/3 and Vx.Type.constrain/4.

Summary

Types

@type fun() :: (any() -> :ok | {:error, String.t()})
@type t() :: %Vx.Constraint{fun: (... -> any()), name: atom(), value: any()}