[−][src]Struct grep_printer::Stats
Summary statistics produced at the end of a search.
When statistics are reported by a printer, they correspond to all searches executed with that printer.
Methods
impl Stats
[src]
pub fn new() -> Stats
[src]
Return a new value for tracking aggregate statistics across searches.
All statistics are set to 0
.
pub fn elapsed(&self) -> Duration
[src]
Return the total amount of time elapsed.
pub fn searches(&self) -> u64
[src]
Return the total number of searches executed.
pub fn searches_with_match(&self) -> u64
[src]
Return the total number of searches that found at least one match.
pub fn bytes_searched(&self) -> u64
[src]
Return the total number of bytes searched.
pub fn bytes_printed(&self) -> u64
[src]
Return the total number of bytes printed.
pub fn matched_lines(&self) -> u64
[src]
Return the total number of lines that participated in a match.
When matches may contain multiple lines then this includes every line that is part of every match.
pub fn matches(&self) -> u64
[src]
Return the total number of matches.
There may be multiple matches per line.
pub fn add_elapsed(&mut self, duration: Duration)
[src]
Add to the elapsed time.
pub fn add_searches(&mut self, n: u64)
[src]
Add to the number of searches executed.
pub fn add_searches_with_match(&mut self, n: u64)
[src]
Add to the number of searches that found at least one match.
pub fn add_bytes_searched(&mut self, n: u64)
[src]
Add to the total number of bytes searched.
pub fn add_bytes_printed(&mut self, n: u64)
[src]
Add to the total number of bytes printed.
pub fn add_matched_lines(&mut self, n: u64)
[src]
Add to the total number of lines that participated in a match.
pub fn add_matches(&mut self, n: u64)
[src]
Add to the total number of matches.
Trait Implementations
impl Eq for Stats
[src]
impl PartialEq<Stats> for Stats
[src]
impl Clone for Stats
[src]
fn clone(&self) -> Stats
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Stats
[src]
impl Debug for Stats
[src]
impl Add<Stats> for Stats
[src]
type Output = Stats
The resulting type after applying the +
operator.
fn add(self, rhs: Stats) -> Stats
[src]
impl<'a> Add<&'a Stats> for Stats
[src]
type Output = Stats
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Stats) -> Stats
[src]
impl AddAssign<Stats> for Stats
[src]
fn add_assign(&mut self, rhs: Stats)
[src]
impl<'a> AddAssign<&'a Stats> for Stats
[src]
fn add_assign(&mut self, rhs: &'a Stats)
[src]
impl Serialize for Stats
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,