# `WaitForIt.Waitable`
[🔗](https://github.com/jvoegele/wait_for_it/blob/2.2.1/lib/wait_for_it/waitable/waitable.ex#L1)

Protocol used for evaluating waitable expressions against waiting conditions to determine if
waiting should continue or halt with a final value.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `value`

```elixir
@type value() :: any()
```

# `wait_type`

```elixir
@type wait_type() :: atom()
```

# `evaluate`

```elixir
@spec evaluate(t(), Macro.Env.t()) :: {:halt, value()} | {:cont, value()}
```

Evaluates the waitable expression to provide its value, or to continue to wait.

It should return `{:halt, value}` if the wait is over and the final value of the waitable
expression has been determined, or `{:cont, value}` if waiting should continue.

# `handle_timeout`

```elixir
@spec handle_timeout(t(), value(), Macro.Env.t()) :: value()
```

Provides the final value of the waitable expression in the event of a timeout.

# `wait_type`

```elixir
@spec wait_type(t()) :: wait_type()
```

---

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