[][src]Struct metrics::exporters::LogExporter

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

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

Methods

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

pub fn new(controller: C, recorder: R, level: Level) -> LogExporter<C, R>[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) where
    C: SnapshotProvider,
    <C as SnapshotProvider>::SnapshotError: Error
[src]

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

pub fn turn(&self) where
    C: SnapshotProvider,
    <C as SnapshotProvider>::SnapshotError: Error
[src]

Run this exporter, logging output only once.

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

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

Auto Trait Implementations

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

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

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T