#delta #hash-map #collection #operations #commit #base

delta-collections

Data structures with revertable operations called deltas

8 releases

0.1.5 Aug 16, 2024
0.1.4 Aug 16, 2024
0.0.2 Aug 15, 2024

#595 in Data structures

30 downloads per month

MIT license

46KB
715 lines

Delta Collections

Data structures with delta entries that enables quick revert of the recent changes. Implementation-wise, the data structures keeps a delta structure that records the additional changes on the base structure. Take the HashMap for example, the user can call DeltaHashMap::commit to merge the additional changes into the base map. However, if the user is unsatisfied with the result of the specific layer of operation, the changes that happens after the layer can be discarded on demand by calling DeltaHashMap::revert.

Currently, only hashmaps are supported. Common operations and iterators on the data structure are also supported.

See DeltaHashMap::commit, DeltaHashMap::revert and DeltaHashMap::cocommit for more information.


lib.rs:

Data structures with delta entries that enables quick unstage of the recent changes. Implementation-wise, the data structures keeps a delta structure that records the additional changes on the base structure. Take the HashMap for example, the user can call DeltaHashMap::commit to merge the additional changes into the base map. However, if the user is unsatisfied with the result of the specific layer of operation, the changes that happens after the layer can be discarded on demand by calling DeltaHashMap::unstage.

See DeltaHashMap::commit, DeltaHashMap::unstage and DeltaHashMap::cocommit for more information.

Dependencies

~0.3–0.9MB
~20K SLoC