pub struct ValidationStatistics {
pub total_directives: usize,
pub valid_directives: usize,
pub warning_directives: usize,
pub error_directives: usize,
pub unknown_directives: usize,
pub total_roles: usize,
pub valid_roles: usize,
pub warning_roles: usize,
pub error_roles: usize,
pub unknown_roles: usize,
pub directives_by_type: HashMap<String, usize>,
pub roles_by_type: HashMap<String, usize>,
}Expand description
Combined validation statistics
Fields§
§total_directives: usizeTotal number of directives processed
valid_directives: usizeNumber of valid directives
warning_directives: usizeNumber of directives with warnings
error_directives: usizeNumber of directives with errors
unknown_directives: usizeNumber of unknown directives
total_roles: usizeTotal number of roles processed
valid_roles: usizeNumber of valid roles
warning_roles: usizeNumber of roles with warnings
error_roles: usizeNumber of roles with errors
unknown_roles: usizeNumber of unknown roles
directives_by_type: HashMap<String, usize>Breakdown by directive type
roles_by_type: HashMap<String, usize>Breakdown by role type
Implementations§
Source§impl ValidationStatistics
impl ValidationStatistics
Sourcepub fn record_directive(
&mut self,
directive: &ParsedDirective,
result: &DirectiveValidationResult,
)
pub fn record_directive( &mut self, directive: &ParsedDirective, result: &DirectiveValidationResult, )
Records a directive validation result
Sourcepub fn record_role(&mut self, role: &ParsedRole, result: &RoleValidationResult)
pub fn record_role(&mut self, role: &ParsedRole, result: &RoleValidationResult)
Records a role validation result
Sourcepub fn directive_success_rate(&self) -> f64
pub fn directive_success_rate(&self) -> f64
Returns validation success rate for directives (0.0 to 1.0)
Sourcepub fn role_success_rate(&self) -> f64
pub fn role_success_rate(&self) -> f64
Returns validation success rate for roles (0.0 to 1.0)
Sourcepub fn overall_success_rate(&self) -> f64
pub fn overall_success_rate(&self) -> f64
Returns overall validation success rate (0.0 to 1.0)
Trait Implementations§
Source§impl Clone for ValidationStatistics
impl Clone for ValidationStatistics
Source§fn clone(&self) -> ValidationStatistics
fn clone(&self) -> ValidationStatistics
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 ValidationStatistics
impl Debug for ValidationStatistics
Source§impl Default for ValidationStatistics
impl Default for ValidationStatistics
Source§fn default() -> ValidationStatistics
fn default() -> ValidationStatistics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationStatistics
impl RefUnwindSafe for ValidationStatistics
impl Send for ValidationStatistics
impl Sync for ValidationStatistics
impl Unpin for ValidationStatistics
impl UnwindSafe for ValidationStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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