Zodish.Type.Enum (zodish v0.2.4)

View Source

This module describes a Zodish enum type (atoms only).

Summary

Functions

Either enables or disables coercion for the given Enum (atom) type.

Creates a new Enum type.

Types

t()

@type t() :: %Zodish.Type.Enum{coerce: boolean() | :unsafe, values: [atom(), ...]}

Functions

coerce(type, value \\ true)

Either enables or disables coercion for the given Enum (atom) type.

new(opts)

Creates a new Enum type.

values(type, values)