serum v0.13.0 Serum.Result
This module defines types for positive results or errors returned by functions in this project.
Link to this section Summary
Functions
Takes a list of result objects (without returned values) and checks if there is no error.
Takes a list of result objects (with returned values) and checks if there is no error.
Prints an error object in a beautiful format.
Link to this section Types
err_details()
err_details() :: msg_detail() | full_detail() | nest_detail()
err_details() :: msg_detail() | full_detail() | nest_detail()
error()
error() :: {:error, err_details()}
error() :: {:error, err_details()}
file()
file() :: binary()
file() :: binary()
full_detail()
line()
line() :: non_neg_integer()
line() :: non_neg_integer()
message()
message() :: binary()
message() :: binary()
msg_detail()
msg_detail() :: message()
msg_detail() :: message()
nest_detail()
t()
t() :: :ok | error()
t() :: :ok | error()
t(type)
t(type) :: {:ok, type} | error()
t(type) :: {:ok, type} | error()
Link to this section Functions
aggregate(results, from)
Takes a list of result objects (without returned values) and checks if there is no error.
Returns :ok
if there is no error.
Returns an aggregated error object if there is one or more errors.
aggregate_values(results, from)
Takes a list of result objects (with returned values) and checks if there is no error.
If there is no error, it returns {:ok, list}
where list
is a list of
returned values.
Returns an aggregated error object if there is one or more errors.
show(result, indent \\ 0)
show(t(), non_neg_integer()) :: :ok
show(t(), non_neg_integer()) :: :ok
Prints an error object in a beautiful format.