# `Reactor.Guard`
[🔗](https://github.com/ash-project/reactor/blob/main/lib/reactor/guard.ex/#L6)

A Reactor guard.

Guard types should implement the `Reactor.Guard.Build` protocol.

This struct contains a single two arity function, which when called with a
step's arguments and context returns one of the following:

- `:cont` - this guard has passed - continue evaluating any additional guards
  and if exhausted run the step.
- `{:halt, result}` - the guard has failed - use `result` as the steps result.

# `t`

```elixir
@type t() :: %Reactor.Guard{
  description: nil | String.t(),
  fun:
    (Reactor.inputs(), Reactor.context() -&gt;
       :cont | {:halt, Reactor.Step.run_result()})
    | mfa()
}
```

---

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