# `Mead.Session.Turn`
[🔗](https://github.com/albertosca/mead/blob/main/lib/mead/session/turn.ex#L1)

One exchange in a conversation: the input, the output once known, and how it ended.

# `status`

```elixir
@type status() :: :in_progress | :ok | :failed | :timeout | :interrupted
```

# `t`

```elixir
@type t() :: %Mead.Session.Turn{
  input: term(),
  output: term(),
  started_at: DateTime.t(),
  status: status()
}
```

# `finish`

```elixir
@spec finish(t(), status(), term()) :: t()
```

Closes a turn with its final status and, when there is one, its output.

# `interrupt`

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

Marks a turn that was still in progress as interrupted; any other turn is unchanged.

# `start`

```elixir
@spec start(term()) :: t()
```

Builds a turn that has just started and has no output yet.

---

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