pub struct UnifiedCommandEvaluator { /* private fields */ }Expand description
Unified command evaluator combining policies and safety rules
Implementations§
Source§impl UnifiedCommandEvaluator
impl UnifiedCommandEvaluator
Sourcepub fn new() -> UnifiedCommandEvaluator
pub fn new() -> UnifiedCommandEvaluator
Create a new unified evaluator with default components
Sourcepub async fn evaluate_with_policy(
&self,
command: &[String],
policy_allowed: bool,
policy_reason: &str,
) -> Result<EvaluationResult, Error>
pub async fn evaluate_with_policy( &self, command: &[String], policy_allowed: bool, policy_reason: &str, ) -> Result<EvaluationResult, Error>
Evaluate with explicit policy check (requires external CommandPolicyEvaluator)
This is a placeholder for integration with CommandPolicyEvaluator. In a real implementation, this would:
- Check policy rules first (deny precedence)
- Then apply safety rules
- Merge results
Sourcepub fn cache(&self) -> &SafetyDecisionCache
pub fn cache(&self) -> &SafetyDecisionCache
Get reference to the cache for metrics/debugging
Sourcepub fn registry(&self) -> &SafeCommandRegistry
pub fn registry(&self) -> &SafeCommandRegistry
Get reference to the registry
Sourcepub fn database(&self) -> &CommandDatabase
pub fn database(&self) -> &CommandDatabase
Get reference to the database
Trait Implementations§
Source§impl Clone for UnifiedCommandEvaluator
impl Clone for UnifiedCommandEvaluator
Source§fn clone(&self) -> UnifiedCommandEvaluator
fn clone(&self) -> UnifiedCommandEvaluator
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 Default for UnifiedCommandEvaluator
impl Default for UnifiedCommandEvaluator
Source§fn default() -> UnifiedCommandEvaluator
fn default() -> UnifiedCommandEvaluator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for UnifiedCommandEvaluator
impl !UnwindSafe for UnifiedCommandEvaluator
impl Forget for UnifiedCommandEvaluator
impl Freeze for UnifiedCommandEvaluator
impl Move for UnifiedCommandEvaluator
impl Send for UnifiedCommandEvaluator
impl Sync for UnifiedCommandEvaluator
impl Unpin for UnifiedCommandEvaluator
impl UnsafeUnpin for UnifiedCommandEvaluator
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
impl<T> CacheValue for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more