Kvasir.Type behaviour (kvasir v0.0.15) View Source

Link to this section Summary

Functions

Lookup a base type.

Link to this section Types

Specs

base() ::
  atom()
  | boolean()
  | integer()
  | String.t()
  | [base()]
  | %{optional(base()) => base()}

Specs

t() :: atom()

Link to this section Functions

Specs

lookup(atom()) :: atom()

Lookup a base type.

Link to this section Callbacks

Specs

describe(value :: term()) :: String.t()

Specs

doc() :: String.t()

Type documentation.

Specs

dump(value :: term()) :: {:ok, term()} | {:error, atom()}

Specs

dump(value :: term(), opts :: Keyword.t()) :: {:ok, term()} | {:error, atom()}

Specs

name() :: String.t()

Type descriptive name.

Specs

obfuscate(value :: term()) :: {:ok, term()} | :obfuscate | {:error, atom()}

Specs

obfuscate(value :: term(), opts :: Keyword.t()) ::
  {:ok, term()} | :obfuscate | {:error, atom()}

Specs

parse(value :: any()) :: {:ok, term()} | {:error, atom()}

Specs

parse(value :: any(), opts :: Keyword.t()) :: {:ok, term()} | {:error, atom()}