View Source Vx.Boolean (Vx v0.1.0)

The Boolean type.

Summary

Types

t()

The boolean type.

Functions

t()

Builds a new Boolean type.

Types

@opaque t()

The boolean type.

Functions

@spec t() :: t()

Builds a new Boolean type.

Examples

iex> Vx.Boolean.t() |> Vx.validate!(true)
:ok

iex> Vx.Boolean.t() |> Vx.validate!(false)
:ok

iex> Vx.Boolean.t() |> Vx.validate!("foo")
** (Vx.Error) must be a boolean