Hush.Transformer.Cast (hush v0.5.0) View Source

Utility functions to cast strings to Elixir native types

Link to this section Summary

Functions

Cast a string to any type. An error is raised on failure.

Link to this section Functions

Specs

to!(:string, String.t()) :: String.t()
to!(:atom, String.t()) :: atom()
to!(:charlist, String.t()) :: charlist()
to!(:float, String.t()) :: float()
to!(:integer, String.t()) :: integer()
to!(:boolean, String.t()) :: boolean()
to!(:module, String.t()) :: module()

Cast a string to any type. An error is raised on failure.