Struct bosun_emitter::Metadata [] [src]

pub struct Metadata<'a> {
    pub metric: &'a str,
    pub rate: &'a str,
    pub unit: &'a str,
    pub description: &'a str,
}

Represents metric meta data.

Fields

Metric name

Metric rate type: [gauge, counter rate]

Metric unit

Metric description

Methods

impl<'a> Metadata<'a>
[src]

Creates new metric meta data.

Encodes Metadata to JSON as String.

Example

let metadata = Metadata::new("lukas.tests.count", "counter", "Tests", "Amount of Lukas Tests");
let json = metadata.to_json().unwrap();

Trait Implementations

impl<'a> Encodable for Metadata<'a>
[src]

Serialize a value using an Encoder.

impl<'a> Debug for Metadata<'a>
[src]

Formats the value using the given formatter.