Result.Error (result v1.7.2)

A Error creator

Link to this section Summary

Functions

Create Error result from value

Link to this section Types

Specs

t(error) :: {:error, error}

Link to this section Functions

Specs

of(arg) :: t(arg) when arg: var

Create Error result from value

Examples

iex> Result.Error.of("a")
{:error, "a"}

iex> Result.Error.of(12345)
{:error, 12345}