View Source Hush.Transformer.Cast (hush v1.0.2)
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
@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.