[−][src]Struct metrics::exporters::LogExporter
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]
R: Recorder + Clone + Into<String>,
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]
C: SnapshotProvider,
<C as SnapshotProvider>::SnapshotError: Error,
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]
C: SnapshotProvider,
<C as SnapshotProvider>::SnapshotError: Error,
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]
self,
interval: Duration
) -> impl Future<Item = (), Error = ()> where
C: AsyncSnapshotProvider,
<C as AsyncSnapshotProvider>::SnapshotError: Error,
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,
C: Send,
R: Send,
impl<C, R> Sync for LogExporter<C, R> where
C: Sync,
R: Sync,
C: Sync,
R: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self