review_adoption/
review_adoption.rs1use adding_rakkotan::{AdoptionPlan, AdoptionPolicy, AdoptionPrinciple as P, Finding};
2
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let plan = AdoptionPlan::new("Example Corp")?
5 .assess(
6 P::PurposeAndOutcome,
7 Finding::Satisfied,
8 "pilot goal is measurable",
9 )?
10 .assess(
11 P::AuthorityAndTerms,
12 Finding::Satisfied,
13 "approver and terms recorded",
14 )?
15 .assess(
16 P::DataGovernance,
17 Finding::Satisfied,
18 "data flow and retention recorded",
19 )?
20 .assess(
21 P::UserProtection,
22 Finding::Satisfied,
23 "support and access needs reviewed",
24 )?
25 .assess(
26 P::OperationalOwnership,
27 Finding::NeedsRevision,
28 "backup owner is not assigned",
29 )?
30 .assess(
31 P::ReversibleAdoption,
32 Finding::Satisfied,
33 "exit process documented",
34 )?;
35
36 let report = AdoptionPolicy::evaluate(&plan);
37 println!("organization: {}", plan.organization());
38 println!("decision: {:?}", report.decision());
39 println!("unresolved: {:?}", report.unresolved());
40 Ok(())
41}