# `Macaw.State.Snapshot`
[🔗](https://github.com/dcoai/macaw/blob/v0.6.0/lib/macaw/state/snapshot.ex#L1)

A state snapshot (spec/03 §4): the current value of every state source of a surface that
persists and isn't declared `snapshot: false`, in the shape of a record's state events
(spec/08), each a state and its value, with no instance, time, initiator or identity.
It carries no identity of whoever took it, so it restores for whoever restores it.

Each value is its text, as persistence writes it (spec/03 §3.2), so a snapshot is plain
data: strings, and maps of strings, that a host saves as it likes, alone or in a bundle.
`Macaw.State.snapshot/1` takes one and `Macaw.State.restore_snapshot/2` restores it,
judging each value as untrusted input.

# `entry`

```elixir
@type entry() :: %{
  state: String.t(),
  value: String.t() | %{required(String.t()) =&gt; String.t()}
}
```

One state's value: its name and its text.

# `t`

```elixir
@type t() :: %Macaw.State.Snapshot{states: [entry()], surface: String.t()}
```

---

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