Zodish.Type.Struct (zodish v0.2.4)

View Source

Summary

Functions

Either enables or disables coercion for the given Struct type.

Creates a new Struct type.

Creates a new Struct type.

Types

shape()

@type shape() :: %{required(atom()) => Zodish.Type.t()}

t()

@type t() :: %Zodish.Type.Struct{
  coerce: boolean(),
  mode: :strict | :strip,
  module: module(),
  shape: shape()
}

Functions

coerce(type, value \\ true)

Either enables or disables coercion for the given Struct type.

module(type, mod)

new(opts)

Creates a new Struct type.

new(module, shape)

Creates a new Struct type.

shape(type, shape)

strict(type)

strip(type)