Croma.Result.get
You're seeing just the function
get, go back to Croma.Result module for more information.
Specs
Returns the value associated with :ok in the given result.
Returns nil if the result is in the form of {:error, _}.
Examples
iex> Croma.Result.get({:ok, 1})
1
iex> Croma.Result.get({:error, :foo})
nil
Specs
Returns the value associated with :ok in the given result.
Returns default if the result is in the form of {:error, _}.
Examples
iex> Croma.Result.get({:ok, 1}, 0)
1
iex> Croma.Result.get({:error, :foo}, 0)
0