pub enum PolicyObservation {
Parsed,
Refused(String),
NotRead,
}Expand description
Whether the policy parsed, was refused, or was never read by this call.
use majordomus_cli::environment::preflight::{derive, Observations, PolicyObservation, Verdict};
let mut o = Observations::empty("demo", 0);
o.policy = PolicyObservation::Refused("unknown key".into());
assert_eq!(derive(&o).check("governance.policy").unwrap().verdict, Verdict::Failed);Variants§
Trait Implementations§
Source§impl Clone for PolicyObservation
impl Clone for PolicyObservation
Source§fn clone(&self) -> PolicyObservation
fn clone(&self) -> PolicyObservation
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 PolicyObservation
impl Debug for PolicyObservation
Source§impl Default for PolicyObservation
impl Default for PolicyObservation
Source§fn default() -> PolicyObservation
fn default() -> PolicyObservation
Returns the “default value” for a type. Read more
impl Eq for PolicyObservation
Source§impl PartialEq for PolicyObservation
impl PartialEq for PolicyObservation
Source§fn eq(&self, other: &PolicyObservation) -> bool
fn eq(&self, other: &PolicyObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PolicyObservation
Auto Trait Implementations§
impl Freeze for PolicyObservation
impl RefUnwindSafe for PolicyObservation
impl Send for PolicyObservation
impl Sync for PolicyObservation
impl Unpin for PolicyObservation
impl UnsafeUnpin for PolicyObservation
impl UnwindSafe for PolicyObservation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.