solverforge-scoring 0.19.12

Incremental constraint scoring for SolverForge
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::stream::relational::RowHandle;

/// One root notification can both retract old rows and insert replacement rows.
/// Consumers remove all old indexes before probing newly published rows.
#[derive(Default, Debug)]
pub struct RowChanges {
    pub removed: Vec<RowHandle>,
    pub inserted: Vec<RowHandle>,
}
impl RowChanges {
    pub fn is_empty(&self) -> bool {
        self.removed.is_empty() && self.inserted.is_empty()
    }
    pub fn len(&self) -> usize {
        self.removed.len() + self.inserted.len()
    }
}