Trait State

Source
pub trait State<T> {
    // Required methods
    fn attempts(&self) -> T;
    fn successes(&self) -> T;
    fn flushes(&self) -> T;
    fn read(&self) -> T;
    fn written(&self) -> T;
}
Expand description

Trait for either state or statistics of loggers.

Required Methods§

Source

fn attempts(&self) -> T

How often was one of the logging macros called.

Source

fn successes(&self) -> T

How often was one of the logging macros called without early exit (e.g., buffer not full)

Source

fn flushes(&self) -> T

How often was the flusher called.

Source

fn read(&self) -> T

How many bytes were flushed so far.

Source

fn written(&self) -> T

How many bytes were logged so far.

Implementors§