Brex v0.2.1 Brex.Result View Source

Represents a result of a rule evaluation. It contains …

  • evaluation: the result of the evaluate call for the
  • rule: the evaluated rule
  • value: the evaluated value

In addition to that it defines a passed?/1 function which receives a Brex.Result or an evaluate return value and determines whether the evaluations was considered successful or not.

Link to this section Summary

Link to this section Types

Link to this type evaluation() View Source
evaluation() :: success() | failure()
Link to this type failure() View Source
failure() :: false | :error | {:error, any()}
Link to this type success() View Source
success() :: true | :ok | {:ok, any()}
Link to this type t() View Source
t() :: %Brex.Result{evaluation: evaluation(), rule: rule(), value: value()}

Link to this section Functions

Link to this function passed?(boolean) View Source
passed?(result :: t() | evaluation()) :: boolean()