Skip to main content

repose_tree/
reconcile.rs

1//! Reconciliation context and utilities.
2
3/// Context for a reconciliation pass.
4pub struct ReconcileContext {
5    /// Current generation.
6    pub generation: u64,
7
8    /// Count of nodes that were reconciled (updated).
9    pub reconciled: usize,
10
11    /// Count of nodes that were skipped (unchanged).
12    pub skipped: usize,
13
14    /// Count of nodes that were created.
15    pub created: usize,
16
17    /// Count of nodes that were removed.
18    pub removed: usize,
19}
20
21impl ReconcileContext {
22    pub fn new(generation: u64) -> Self {
23        Self {
24            generation,
25            reconciled: 0,
26            skipped: 0,
27            created: 0,
28            removed: 0,
29        }
30    }
31}