View Source Hush.Transformer.Cast (hush v1.2.0)
Utility functions to cast strings to Elixir native types
Summary
Functions
Cast a string to any type. An error is raised on failure.
Functions
@spec to!(:string, String.t()) :: String.t()
@spec to!(:atom, String.t()) :: atom()
@spec to!(:charlist, String.t()) :: charlist()
@spec to!(:float, String.t()) :: float()
@spec to!(:integer, String.t()) :: integer()
@spec to!(:boolean, String.t()) :: boolean()
@spec to!(:module, String.t()) :: module()
Cast a string to any type. An error is raised on failure.