MetricsExporter

Trait MetricsExporter 

Source
pub trait MetricsExporter<T> {
    // Required methods
    fn to_json_string(&self) -> Result<String, SpiderError>;
    fn to_json_string_pretty(&self) -> Result<String, SpiderError>;
    fn to_markdown_string(&self) -> String;
    fn to_display_string(&self) -> String;
}
Expand description

Trait for exporting metrics into multiple output formats.

Required Methods§

Source

fn to_json_string(&self) -> Result<String, SpiderError>

Exports metrics as compact JSON.

§Errors

Returns an error when serialization fails.

Source

fn to_json_string_pretty(&self) -> Result<String, SpiderError>

Exports metrics as pretty-printed JSON.

§Errors

Returns an error when serialization fails.

Source

fn to_markdown_string(&self) -> String

Exports metrics as a Markdown report.

Source

fn to_display_string(&self) -> String

Exports metrics as a plain-text display report.

Implementors§