View Source Talos.Types.AnyType (Talos v1.12.2)

Any type is used to show that data doesn't have a constant type

For example:

  iex> import Talos, only: [any: 1]
  iex> could_be_any_type = any()
  iex> Talos.valid?(could_be_any_type, 2 == 2)
  true
  iex> Talos.valid?(could_be_any_type, nil)
  true
  iex> Talos.valid?(could_be_any_type, "123")
  true

Summary

Functions

Callback implementation for Talos.Types.errors/2.

Callback implementation for Talos.Types.valid?/2.

Types

@type t() :: %{__struct__: any()}

Functions

@spec errors(struct() | module(), any()) :: []

Callback implementation for Talos.Types.errors/2.

@spec valid?(struct() | module(), any()) :: true

Callback implementation for Talos.Types.valid?/2.