[][src]Struct metrics_exporter_log::LogExporter

pub struct LogExporter<C, B> where
    B: Builder
{ /* fields omitted */ }

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

Methods

impl<C, B> LogExporter<C, B> where
    B: Builder,
    B::Output: Drain<String> + Observer,
    C: Observe
[src]

pub fn new(controller: C, builder: B, level: Level, interval: Duration) -> Self[src]

Creates a new LogExporter that logs at the configurable level.

Observers expose their output by being converted into strings.

pub fn run(&mut self)[src]

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

pub fn turn(&mut self)[src]

Run this exporter, logging output only once.

pub async fn async_run(__arg0: Self)[src]

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

Auto Trait Implementations

impl<C, B> RefUnwindSafe for LogExporter<C, B> where
    C: RefUnwindSafe,
    <B as Builder>::Output: RefUnwindSafe

impl<C, B> Send for LogExporter<C, B> where
    C: Send,
    <B as Builder>::Output: Send

impl<C, B> Sync for LogExporter<C, B> where
    C: Sync,
    <B as Builder>::Output: Sync

impl<C, B> Unpin for LogExporter<C, B> where
    C: Unpin,
    <B as Builder>::Output: Unpin

impl<C, B> UnwindSafe for LogExporter<C, B> where
    C: UnwindSafe,
    <B as Builder>::Output: UnwindSafe

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.