pub struct AdoptionReport { /* private fields */ }Expand description
Explainable result in stable principle order.
Implementations§
Source§impl AdoptionReport
impl AdoptionReport
Sourcepub const fn decision(&self) -> AdoptionDecision
pub const fn decision(&self) -> AdoptionDecision
Returns the final decision.
Examples found in repository?
examples/review_adoption.rs (line 38)
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}Sourcepub fn missing(&self) -> &[AdoptionPrinciple]
pub fn missing(&self) -> &[AdoptionPrinciple]
Returns principles without an assessment.
Sourcepub fn unresolved(&self) -> &[AdoptionPrinciple]
pub fn unresolved(&self) -> &[AdoptionPrinciple]
Returns principles requiring clarification or revision.
Examples found in repository?
examples/review_adoption.rs (line 39)
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}Sourcepub fn violated(&self) -> &[AdoptionPrinciple]
pub fn violated(&self) -> &[AdoptionPrinciple]
Returns principles with a known violation.
Trait Implementations§
Source§impl Clone for AdoptionReport
impl Clone for AdoptionReport
Source§fn clone(&self) -> AdoptionReport
fn clone(&self) -> AdoptionReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdoptionReport
impl Debug for AdoptionReport
impl Eq for AdoptionReport
Source§impl PartialEq for AdoptionReport
impl PartialEq for AdoptionReport
impl StructuralPartialEq for AdoptionReport
Auto Trait Implementations§
impl Freeze for AdoptionReport
impl RefUnwindSafe for AdoptionReport
impl Send for AdoptionReport
impl Sync for AdoptionReport
impl Unpin for AdoptionReport
impl UnsafeUnpin for AdoptionReport
impl UnwindSafe for AdoptionReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more