View Source AvroEx.Schema.Primitive (AvroEx v1.2.0)

Functions for handling primitive types in Avro schemas

Link to this section Summary

Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.

Link to this section Types

Specs

primitive() ::
  nil | :boolean | :integer | :long | :float | :double | :bytes | :string

Specs

t() :: %AvroEx.Schema.Primitive{
  metadata: %{required(String.t()) => String.t()},
  type: primitive()
}

Link to this section Functions

Specs

cast(any()) :: :error | {:ok, t()}

Callback implementation for Ecto.Type.cast/1.

Specs

dump(any()) :: {:ok, any()}

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Specs

load(any()) :: {:ok, any()}

Callback implementation for Ecto.Type.load/1.

Specs

type() :: :primitive

Callback implementation for Ecto.Type.type/0.

Specs

type(nil | <<_::24, _::_*8>>) ::
  :boolean | :bytes | :double | :float | :integer | :long | nil | :string