sim_lib_music_serial/
report.rs1use crate::{InvariantLedger, PracticeId, PracticeRuleId, SerialReading};
4
5#[derive(Clone, Debug, PartialEq, Eq)]
7pub struct SerialPracticeReport {
8 pub practice_id: PracticeId,
10 pub reading: SerialReading,
12 pub ledger: InvariantLedger<PracticeRuleId>,
14}
15
16impl SerialPracticeReport {
17 pub fn has_unwaived_violations(&self) -> bool {
19 self.ledger
20 .entries()
21 .iter()
22 .any(|entry| matches!(entry.status, crate::InvariantStatus::Violated))
23 }
24}