pub struct ParseStatistics {
pub directive_count: usize,
pub role_count: usize,
pub directives_by_type: HashMap<String, usize>,
pub roles_by_type: HashMap<String, usize>,
pub lines_processed: usize,
}Expand description
Statistics about parsed content
Fields§
§directive_count: usizeNumber of directives found
role_count: usizeNumber of roles found
directives_by_type: HashMap<String, usize>Breakdown by directive type
roles_by_type: HashMap<String, usize>Breakdown by role type
lines_processed: usizeLines processed
Implementations§
Source§impl ParseStatistics
impl ParseStatistics
Sourcepub fn record_directive(&mut self, directive: &ParsedDirective)
pub fn record_directive(&mut self, directive: &ParsedDirective)
Records a directive
Sourcepub fn record_role(&mut self, role: &ParsedRole)
pub fn record_role(&mut self, role: &ParsedRole)
Records a role
Sourcepub fn set_lines_processed(&mut self, lines: usize)
pub fn set_lines_processed(&mut self, lines: usize)
Records lines processed
Sourcepub fn total_items(&self) -> usize
pub fn total_items(&self) -> usize
Returns total items parsed
Trait Implementations§
Source§impl Clone for ParseStatistics
impl Clone for ParseStatistics
Source§fn clone(&self) -> ParseStatistics
fn clone(&self) -> ParseStatistics
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 ParseStatistics
impl Debug for ParseStatistics
Source§impl Default for ParseStatistics
impl Default for ParseStatistics
Source§fn default() -> ParseStatistics
fn default() -> ParseStatistics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParseStatistics
impl RefUnwindSafe for ParseStatistics
impl Send for ParseStatistics
impl Sync for ParseStatistics
impl Unpin for ParseStatistics
impl UnwindSafe for ParseStatistics
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