Skip to main content

review_change/
review_change.rs

1use nitijo_save::{ChangeProposal, EverydayPrinciple as P, Finding, ProtectionPolicy};
2
3fn main() -> Result<(), nitijo_save::ProtectionError> {
4    let proposal = ChangeProposal::new("Neighborhood service move")?
5        .assess(
6            P::InformedConsent,
7            Finding::Protected,
8            "Residents approved the plan",
9        )?
10        .assess(
11            P::MeaningfulChoice,
12            Finding::Protected,
13            "Existing service remains available",
14        )?
15        .assess(
16            P::RoutineContinuity,
17            Finding::AtRisk,
18            "Opening hours may change",
19        )?
20        .assess(
21            P::EssentialAccess,
22            Finding::Protected,
23            "Step-free route verified",
24        )?
25        .assess(
26            P::Reversibility,
27            Finding::Protected,
28            "Three-month rollback window",
29        )?
30        .assess(
31            P::ProportionateBurden,
32            Finding::Protected,
33            "No added fee or travel time",
34        )?;
35
36    let report = ProtectionPolicy::evaluate(&proposal);
37    println!("proposal: {}", proposal.name());
38    println!("decision: {:?}", report.decision());
39    println!("at risk: {:?}", report.at_risk());
40
41    Ok(())
42}