Design Patterns in Rust: Memento or how to undo your actions

Introduction The memento pattern can be used to (partially) expose the internal state of an object. One use case for this pattern is to serialize an object to a file or as JSON for example, another is to build an…














