Memento

Memento: capture state to restore later

Problem: you want undo β€” snapshot an object's state now, and put it back later β€” without exposing the object's internals to whoever holds the snapshot.

PawWalk scenario: a booking draft. Snapshot it before risky edits; on cancel, restore the snapshot.

The memento is just a copy of the fields. save_state returns it; restore copies it back.