pub struct ValidationResult {
pub effect: RuleEffect,
pub should_log: bool,
}Expand description
Access control validation result with logging indication
This structure contains both the access control decision and whether the decision should be logged according to the configured logging rules. This supports the Tail-f ACM extensions that provide fine-grained control over access control logging.
§Examples
use nacm_validator::{ValidationResult, RuleEffect};
let result = ValidationResult {
effect: RuleEffect::Permit,
should_log: true,
};
if result.should_log {
println!("Access {}: should be logged",
if result.effect == RuleEffect::Permit { "permitted" } else { "denied" });
}Fields§
§effect: RuleEffectThe access control decision
should_log: boolWhether this decision should be logged
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
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 ValidationResult
impl Debug for ValidationResult
Source§impl PartialEq for ValidationResult
impl PartialEq for ValidationResult
impl Copy for ValidationResult
impl Eq for ValidationResult
impl StructuralPartialEq for ValidationResult
Auto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnwindSafe for ValidationResult
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