[−][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.
Implementations
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<'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 Add<Stats> for Stats
[src]
type Output = Stats
The resulting type after applying the +
operator.
fn add(self, rhs: Stats) -> Stats
[src]
impl<'a> AddAssign<&'a Stats> for Stats
[src]
fn add_assign(&mut self, rhs: &'a Stats)
[src]
impl AddAssign<Stats> for Stats
[src]
fn add_assign(&mut self, rhs: Stats)
[src]
impl Clone for Stats
[src]
impl Debug for Stats
[src]
impl Default for Stats
[src]
impl Eq for Stats
[src]
impl PartialEq<Stats> for Stats
[src]
impl Serialize for Stats
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Stats
[src]
impl StructuralPartialEq for Stats
[src]
Auto Trait Implementations
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,