Skip to main content

MetricSnapshotFormatter

Trait MetricSnapshotFormatter 

Source
pub trait MetricSnapshotFormatter: Send + Sync {
    // Required method
    fn format(&self, snapshot: &ProgressMetricSnapshot) -> String;
}
Expand description

Formats one progress metric snapshot into a string.

Formatter implementations decide whether the returned string is human readable text, JSON, line protocol, CSV, or another textual representation.

Required Methods§

Source

fn format(&self, snapshot: &ProgressMetricSnapshot) -> String

Formats a metric snapshot.

§Parameters
  • snapshot - Metric snapshot to format.
§Returns

A formatted string for downstream consumers.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§