pub struct DecisionEngine { /* private fields */ }Expand description
Sequential policy engine that short-circuits on deny or defer.
Implementations§
Source§impl DecisionEngine
impl DecisionEngine
Sourcepub fn register_node<N: DecisionNode + 'static>(
&mut self,
node: N,
) -> RuntimeResult<()>
pub fn register_node<N: DecisionNode + 'static>( &mut self, node: N, ) -> RuntimeResult<()>
Appends one uniquely named node within the count and name-byte limits. Rejection leaves evaluation order and existing nodes unchanged.
Sourcepub fn node_names(&self) -> &[String]
pub fn node_names(&self) -> &[String]
Returns decision node names in evaluation order.
Sourcepub fn evaluate(
&self,
command: &CommandEnvelope,
context: &dyn RuntimeContext,
) -> RuntimeResult<DecisionOutcome>
pub fn evaluate( &self, command: &CommandEnvelope, context: &dyn RuntimeContext, ) -> RuntimeResult<DecisionOutcome>
Evaluates nodes in order and returns the first non-allow outcome.
Trait Implementations§
Source§impl Debug for DecisionEngine
impl Debug for DecisionEngine
Source§impl Default for DecisionEngine
impl Default for DecisionEngine
Source§fn default() -> DecisionEngine
fn default() -> DecisionEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DecisionEngine
impl !UnwindSafe for DecisionEngine
impl Freeze for DecisionEngine
impl Send for DecisionEngine
impl Sync for DecisionEngine
impl Unpin for DecisionEngine
impl UnsafeUnpin for DecisionEngine
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