We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
value_count
sv::Snapshot
1 parent 69b3d20 commit 32da441Copy full SHA for 32da441
src/snapshot_vec.rs
@@ -60,6 +60,8 @@ impl<D> fmt::Debug for SnapshotVec<D>
60
61
// Snapshots are tokens that should be created/consumed linearly.
62
pub struct Snapshot {
63
+ // Number of values at the time the snapshot was taken.
64
+ pub(crate) value_count: usize,
65
// Length of the undo log at the time the snapshot was taken.
66
undo_len: usize,
67
}
@@ -173,10 +175,9 @@ impl<D: SnapshotVecDelegate> SnapshotVec<D> {
173
175
174
176
177
pub fn start_snapshot(&mut self) -> Snapshot {
- let length = self.undo_log.len();
178
self.num_open_snapshots += 1;
- Snapshot { length: length }
179
Snapshot {
180
+ value_count: self.values.len(),
181
undo_len: self.undo_log.len(),
182
183
0 commit comments