Show HN: Rust library for Undo/Redo using deltas, snapshots or commands
1–5 of 5 posts
Re: Show HN: Rust library for Undo/Redo using deltas, snapshots or commands
#2Re: Show HN: Rust library for Undo/Redo using deltas, snapshots or commands
#3Re: Show HN: Rust library for Undo/Redo using deltas, snapshots or commands
#4Re: Show HN: Rust library for Undo/Redo using deltas, snapshots or commands
#5This is awesome and I've needed it often. Could it hypothetically support filtered undo? For example in a collaborative app where not all edits are owned by the user.
- Having one history bistack for each user or permissions group to enforce ownership;
- Giving each new object's a unique key (e.g. from a counter, possibly a persistent one) to prevent key collisions by avoiding ever trying to fill the same container slot more than once;
- Storing the objects in a sparse container such as BTreeMap, BTreeSet, HashMap, HashSet to avoid visiting emptied slots when iterating over all the elements.
I have not tested this, but it could be a nice case to add to examples.
(having used a bullet list I immediately feel the need to explain myself: this message was whole written by hand)