# `Monty.Memento`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/memento.ex#L1)

A snapshot of an object's internal state, as an opaque map: Monty's
`memento.py`.

Monty defines `Memento` as `Mapping[str, Any]` and nothing more — the *shape*
is deliberately not specified, because a memento is only ever handed back to
the object that made it. What a caller may do with one is save it, log it, or
give it back; reading a key out of it is what every logging bug looks like.

Here the same holds, with the one addition Python does not need: an Elixir map
can be pattern-matched by anyone, so the discipline is written down instead of
being enforced by the type.

# `t`

```elixir
@type t() :: %{optional(atom() | String.t()) =&gt; term()}
```

A state dict: whatever an object's `state_dict/1` returned.

Keys are atoms and values are whatever the object put there — a graph memory, a
list of percepts, a telemetry log. Treat it as opaque outside the module that
produces it.

---

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