#[non_exhaustive]pub struct AuditDecision<'a> {
pub caller: &'a str,
pub capability: &'a str,
pub context: &'a Value,
pub allowed: bool,
pub source: &'a str,
pub rule: Option<usize>,
pub reason: Option<&'a str>,
pub explanation: Option<&'a DecisionExplanation>,
pub site: CallSite,
}Expand description
A decision observation; recording must never change authorization semantics.
#[non_exhaustive] so it can grow: build one with AuditDecision::new and the
with_* methods. Sinks that predate a field ignore it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.caller: &'a str§capability: &'a str§context: &'a Value§allowed: bool§source: &'a str§rule: Option<usize>§reason: Option<&'a str>§explanation: Option<&'a DecisionExplanation>Why the policy decided as it did. Present only while a recorder is installed.
site: CallSiteHow the decision was reached, and the call it belongs to.
Implementations§
Source§impl<'a> AuditDecision<'a>
impl<'a> AuditDecision<'a>
pub fn new( caller: &'a str, capability: &'a str, context: &'a Value, allowed: bool, source: &'a str, rule: Option<usize>, reason: Option<&'a str>, ) -> Self
pub fn with_explanation( self, explanation: Option<&'a DecisionExplanation>, ) -> Self
pub fn with_site(self, site: CallSite) -> Self
Trait Implementations§
Source§impl<'a> Clone for AuditDecision<'a>
impl<'a> Clone for AuditDecision<'a>
impl<'a> Copy for AuditDecision<'a>
Auto Trait Implementations§
impl<'a> Freeze for AuditDecision<'a>
impl<'a> RefUnwindSafe for AuditDecision<'a>
impl<'a> Send for AuditDecision<'a>
impl<'a> Sync for AuditDecision<'a>
impl<'a> Unpin for AuditDecision<'a>
impl<'a> UnsafeUnpin for AuditDecision<'a>
impl<'a> UnwindSafe for AuditDecision<'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
Mutably borrows from an owned value. Read more