pub enum PolicyResult {
Allow,
Deny {
reason: String,
},
RequiresApproval {
timeout_secs: u32,
},
}Expand description
The outcome of a PolicyEvaluator::evaluate call.
Gated on alloc because Deny::reason carries a String.
Variants§
Allow
The action is permitted.
Deny
The action is denied; reason explains why.
RequiresApproval
Human approval is required within the given timeout.
Trait Implementations§
Source§impl Clone for PolicyResult
impl Clone for PolicyResult
Source§fn clone(&self) -> PolicyResult
fn clone(&self) -> PolicyResult
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 PolicyResult
impl Debug for PolicyResult
Source§impl PartialEq for PolicyResult
impl PartialEq for PolicyResult
Source§fn eq(&self, other: &PolicyResult) -> bool
fn eq(&self, other: &PolicyResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PolicyResult
Auto Trait Implementations§
impl Freeze for PolicyResult
impl RefUnwindSafe for PolicyResult
impl Send for PolicyResult
impl Sync for PolicyResult
impl Unpin for PolicyResult
impl UnsafeUnpin for PolicyResult
impl UnwindSafe for PolicyResult
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