View Source Want.Sort (want v1.17.1)

Specialized functions for dealing with sort parameters in Phoenix requests.

Summary

Types

@type direction() :: :asc | :desc
@type result() :: {:ok, sort()} | {:error, binary()}
@type sort() :: {field :: atom(), direction :: direction()}

Functions

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

Callback implementation for Want.Type.cast/2.

Link to this function

cast(field, opts, fields)

View Source