Want.Sort (want v1.14.0)

Specialized functions for dealing with sort parameters in Phoenix requests.

Link to this section Summary

Link to this section Types

Specs

direction() :: :asc | :desc

Specs

result() :: {:ok, sort()} | {:error, binary()}

Specs

sort() :: {field :: atom(), direction :: direction()}

Link to this section Functions

Link to this function

cast(input, opts)

Specs

cast(input :: any(), opts :: Keyword.t()) :: result()

Callback implementation for Want.Type.cast/2.

Link to this function

cast(field, opts, fields)