pub struct PolicyEngine { /* private fields */ }Expand description
Pure policy engine with registered rule ids.
Implementations§
Source§impl PolicyEngine
impl PolicyEngine
Sourcepub fn register_rule(
&mut self,
rule_id: impl Into<String>,
) -> Result<(), PolicyError>
pub fn register_rule( &mut self, rule_id: impl Into<String>, ) -> Result<(), PolicyError>
Register a rule id.
Sourcepub fn compose(
&self,
contributions: Vec<PolicyContribution>,
break_glass: Option<BreakGlassAuthorization>,
) -> Result<PolicyDecision, PolicyError>
pub fn compose( &self, contributions: Vec<PolicyContribution>, break_glass: Option<BreakGlassAuthorization>, ) -> Result<PolicyDecision, PolicyError>
Compose outcomes for one artifact or operation.
Trait Implementations§
Source§impl Clone for PolicyEngine
impl Clone for PolicyEngine
Source§fn clone(&self) -> PolicyEngine
fn clone(&self) -> PolicyEngine
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 PolicyEngine
impl Debug for PolicyEngine
Source§impl Default for PolicyEngine
impl Default for PolicyEngine
Source§fn default() -> PolicyEngine
fn default() -> PolicyEngine
Returns the “default value” for a type. Read more
Source§impl PartialEq for PolicyEngine
impl PartialEq for PolicyEngine
Source§fn eq(&self, other: &PolicyEngine) -> bool
fn eq(&self, other: &PolicyEngine) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PolicyEngine
impl StructuralPartialEq for PolicyEngine
Auto Trait Implementations§
impl Freeze for PolicyEngine
impl RefUnwindSafe for PolicyEngine
impl Send for PolicyEngine
impl Sync for PolicyEngine
impl Unpin for PolicyEngine
impl UnsafeUnpin for PolicyEngine
impl UnwindSafe for PolicyEngine
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