pub enum PolicyMatch {
NoOpinion,
Allow,
Deny(PermissionDenial),
RequireApproval(ApprovalRequest),
}Expand description
The result of a single PermissionPolicy evaluation.
Unlike PermissionDecision, a policy can return PolicyMatch::NoOpinion
to indicate it has nothing to say about this request kind, letting other
policies in the CompositePermissionChecker chain decide.
Variants§
NoOpinion
This policy does not apply to the given request kind.
Allow
This policy explicitly allows the operation.
Deny(PermissionDenial)
This policy explicitly denies the operation.
RequireApproval(ApprovalRequest)
This policy requires user approval before the operation can proceed.
Trait Implementations§
Source§impl Clone for PolicyMatch
impl Clone for PolicyMatch
Source§fn clone(&self) -> PolicyMatch
fn clone(&self) -> PolicyMatch
Returns a duplicate of the value. Read more
1.0.0 · 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 PolicyMatch
impl Debug for PolicyMatch
Source§impl<'de> Deserialize<'de> for PolicyMatch
impl<'de> Deserialize<'de> for PolicyMatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PolicyMatch
impl PartialEq for PolicyMatch
Source§impl Serialize for PolicyMatch
impl Serialize for PolicyMatch
impl Eq for PolicyMatch
impl StructuralPartialEq for PolicyMatch
Auto Trait Implementations§
impl Freeze for PolicyMatch
impl RefUnwindSafe for PolicyMatch
impl Send for PolicyMatch
impl Sync for PolicyMatch
impl Unpin for PolicyMatch
impl UnsafeUnpin for PolicyMatch
impl UnwindSafe for PolicyMatch
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