Value History tracker
Closed this issue · 0 comments
hgzimmerman commented
Add a struct that stores values in a Vec
where the tail element of the vec represents the most recent change.
Notable methods could include:
forget
- drop all elements except the last element.reset
- drop all elements except the first element.dirty
- returnstrue
if the len of the vec > 1. (maybe a specific value could be used to mark this)make_older
- deletes the current last element (???)
Maybe a VecDeque
might be a better underlying data structure. That would allow the first element to efficiently represent the "current" value.