View Source DataSpecs.Cast.Extra (dataspecs v2.1.0)

Elixir types cast.

Summary

Functions

Type cast for Elixir Date.t(). Expect an iso8601 date string value, returns a Date.t().

Type cast for Elixir DateTime.t(). Expect an iso8601 datetime string value, returns a DateTime.t().

Type cast for Elixir MapSet.t(T). Expect an Enumarable value of type T, returns a MapSet.t(T).

All extra types casts.

Functions

Link to this function

isodate(value, custom_type_casts, list)

View Source

Type cast for Elixir Date.t(). Expect an iso8601 date string value, returns a Date.t().

Link to this function

isodatetime(value, custom_type_casts, list)

View Source

Type cast for Elixir DateTime.t(). Expect an iso8601 datetime string value, returns a DateTime.t().

Link to this function

mapset(value, custom_type_cast, list)

View Source

Type cast for Elixir MapSet.t(T). Expect an Enumarable value of type T, returns a MapSet.t(T).

@spec type_casts() :: DataSpecs.Types.custom_type_casts()

All extra types casts.

MyData.cast(value, DataSpecs.Cast.Extra.type_cast())