[][src]Struct metrics_exporter_log::LogExporter

pub struct LogExporter<R> { /* fields omitted */ }

Exports metrics by converting them to a textual representation and logging them.

Methods

impl<R> LogExporter<R> where
    R: MetricsRecorder + Clone + Into<String>, 
[src]

pub fn new(controller: Controller, recorder: R, level: Level) -> Self[src]

Creates a new LogExporter that logs at the configurable level.

Recorders expose their output by being converted into strings.

pub fn run(&mut self, interval: Duration)[src]

Runs this exporter on the current thread, logging output on the given interval.

pub fn turn(&self)[src]

Run this exporter, logging output only once.

pub fn into_future(
    self,
    interval: Duration
) -> impl Future<Item = (), Error = ()>
[src]

Converts this exporter into a future which logs output on the given interval.

Auto Trait Implementations

impl<R> Send for LogExporter<R> where
    R: Send

impl<R> Sync for LogExporter<R> where
    R: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T