pub struct PolicyProjection<'a> { /* private fields */ }Expand description
A policy’s rules spelled for one harness, in profile order.
Implementations§
Source§impl<'a> PolicyProjection<'a>
impl<'a> PolicyProjection<'a>
pub fn rules(&self) -> &[(&'a ToolRule, ProjectedRule)]
Sourcepub fn default_action(&self) -> Option<ToolAction>
pub fn default_action(&self) -> Option<ToolAction>
What a tool no rule names gets: the strictest * rule’s action, or None without one.
Sourcepub fn natives(&self, action: ToolAction, kind: RuleKind) -> Vec<String>
pub fn natives(&self, action: ToolAction, kind: RuleKind) -> Vec<String>
Native names of the kind rules with action, built-in tools first, each name once.
Trait Implementations§
Source§impl Serialize for PolicyProjection<'_>
The published shape of a projection (project in the WASM package): per rule, then the
native names each action ends with. A consumer decides from these what to warn about: a
status other than known, a covered_by or a note is something the author may not
have meant.
impl Serialize for PolicyProjection<'_>
The published shape of a projection (project in the WASM package): per rule, then the
native names each action ends with. A consumer decides from these what to warn about: a
status other than known, a covered_by or a note is something the author may not
have meant.
Auto Trait Implementations§
impl<'a> Forget for PolicyProjection<'a>
impl<'a> Freeze for PolicyProjection<'a>
impl<'a> Move for PolicyProjection<'a>
impl<'a> RefUnwindSafe for PolicyProjection<'a>
impl<'a> Send for PolicyProjection<'a>
impl<'a> Sync for PolicyProjection<'a>where
RawVecInner: Sync,
impl<'a> Unpin for PolicyProjection<'a>
impl<'a> UnsafeUnpin for PolicyProjection<'a>
impl<'a> UnwindSafe for PolicyProjection<'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