pub struct Observed<'a> {
pub subject: &'a Subject<'a>,
pub policy: PolicyId,
pub compiled: CompiledId,
pub outcome: &'a Outcome,
}Expand description
One evaluator’s account of a single policy’s attempt and outcome, on its declared observation surface.
The decision channel (Evaluator::evaluate) short-circuits once an
overall verdict cannot get any more severe. This one does not: a
metapolicy that freezes agents for repeatedly tripping other policies has
to see every attempt and outcome on its declared surface, whether or not
evaluation of the write as a whole stopped early.
Fields§
§subject: &'a Subject<'a>The subject the attempt was against.
policy: PolicyIdWhich policy this attempt and outcome belong to, in this crate’s own
bookkeeping – useful for a caller correlating this event with a
crate::evaluate::Verdict, but not what an evaluator serving many
compiled policies uses to tell them apart; see compiled.
compiled: CompiledIdWhich compiled artifact this attempt and outcome belong to, in the
evaluator’s own naming – see CompiledId’s doc comment. This,
not policy, is what a multi-policy evaluator consults.
outcome: &'a OutcomeThe verdict every policy that judged the subject reached together: what the write path did with the attempt, not only what this policy said.
Trait Implementations§
Source§impl<'a> PartialEq for Observed<'a>
impl<'a> PartialEq for Observed<'a>
impl<'a> Copy for Observed<'a>
impl<'a> Eq for Observed<'a>
impl<'a> StructuralPartialEq for Observed<'a>
Auto Trait Implementations§
impl<'a> Freeze for Observed<'a>
impl<'a> RefUnwindSafe for Observed<'a>
impl<'a> Send for Observed<'a>
impl<'a> Sync for Observed<'a>
impl<'a> Unpin for Observed<'a>
impl<'a> UnsafeUnpin for Observed<'a>
impl<'a> UnwindSafe for Observed<'a>
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
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
§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
key and return true if they are equal.