Zodish.Type.Refine (zodish v0.2.4)

View Source

Summary

Functions

Refines the given inner_type with some arbitrary validation function.

Types

t()

@type t() :: t(Zodish.Type.t())

t(inner_type)

@type t(inner_type) :: %Zodish.Type.Refine{
  error: String.t(),
  fun: (any() -> boolean()) | mfa(),
  inner_type: inner_type
}

Functions

error(type, arg)

fun(type, fun)

new(inner_type, fun, opts \\ [])

Refines the given inner_type with some arbitrary validation function.