Skip to content
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.

Value History tracker #9

Closed
hgzimmerman opened this issue Nov 10, 2019 · 0 comments · Fixed by #10
Closed

Value History tracker #9

hgzimmerman opened this issue Nov 10, 2019 · 0 comments · Fixed by #10

Comments

@hgzimmerman
Copy link
Member

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 - returns true 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant