# `Spectre.Operation.Outcome`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/operation/outcome.ex#L1)

Typed terminal outcome of an operational loop.

# `category`

```elixir
@type category() ::
  :completed
  | :failed
  | :cancelled
  | :expired
  | :budget_exhausted
  | :unknown_side_effect
```

# `t`

```elixir
@type t() :: %Spectre.Operation.Outcome{
  artifacts: [term()],
  at: non_neg_integer(),
  category: category(),
  consumed: term(),
  last_revision: non_neg_integer() | nil,
  limit: term(),
  metadata: map(),
  partial: map(),
  reason: term(),
  result: term()
}
```

# `new`

```elixir
@spec new(
  category(),
  keyword()
) :: t()
```

# `validate`

```elixir
@spec validate(t()) :: :ok | {:error, term()}
```

# `validate!`

```elixir
@spec validate!(t()) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
