View Source Confex.Type (confex v3.5.1)

This module is responsible for Confex type-casting.

Summary

Functions

Parse string and cast it to Elixir type.

Types

@type t() ::
  :string
  | :integer
  | :float
  | :boolean
  | :atom
  | :module
  | :list
  | :charlist
  | {module :: module(), function :: atom(), additional_arguments :: list()}
@type value() :: String.t() | nil

Functions

@spec cast(value :: value(), type :: t()) :: {:ok, any()} | {:error, String.t()}

Parse string and cast it to Elixir type.