View Source Filterable.Cast (Filterable v0.7.5)

Contains functions which perform filter values type casting. Each function should return casted value or :error atom.

Link to this section Summary

Link to this section Functions

Link to this function

atom(value, checked_values)

View Source
@spec atom(String.t() | atom(), [atom()]) :: atom() | :error
@spec atom_unchecked(String.t() | atom()) :: atom() | :error
@spec boolean(String.t() | boolean()) :: boolean() | :error
@spec date(String.t() | Date.t()) :: Date.t() | :error
@spec datetime(String.t() | NaiveDateTime.t()) :: NaiveDateTime.t() | :error
@spec float(String.t() | number()) :: float() | :error
@spec integer(String.t() | number()) :: integer() | :error
@spec string(any()) :: String.t()