# `Minga.Buffer.UndoHistory.Restore`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/buffer/undo_history/restore.ex#L1)

Document snapshot returned by an undo or redo transition.

The history owns which snapshot should be restored. The buffer process owns applying that snapshot to the live buffer state.

# `t`

```elixir
@type t() :: %Minga.Buffer.UndoHistory.Restore{
  document: Minga.Buffer.Document.t(),
  source: Minga.Buffer.EditSource.undo_source(),
  version: non_neg_integer()
}
```

# `new`

```elixir
@spec new(
  non_neg_integer(),
  Minga.Buffer.Document.t(),
  Minga.Buffer.EditSource.undo_source()
) :: t()
```

Creates a restore snapshot.

---

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