kvasir v0.0.4 Kvasir.Type behaviour View Source

Link to this section Summary

Functions

Lookup a base type.

Link to this section Types

Link to this type

base()

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

Link to this section Functions

Lookup a base type.

Link to this section Callbacks

Link to this callback

describe(value)

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

Type documentation.

Link to this callback

dump(value)

View Source
dump(value :: term()) :: {:ok, term()} | {:error, atom()}
Link to this callback

dump(value, opts)

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

Type descriptive name.

Link to this callback

obfuscate(value)

View Source
obfuscate(value :: term()) :: {:ok, term()} | :obfuscate | {:error, atom()}
Link to this callback

obfuscate(value, opts)

View Source
obfuscate(value :: term(), opts :: Keyword.t()) ::
  {:ok, term()} | :obfuscate | {:error, atom()}
Link to this callback

parse(value)

View Source
parse(value :: any()) :: {:ok, term()} | {:error, atom()}
Link to this callback

parse(value, opts)

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