Trait prometheus::Encoder [−][src]
An interface for encoding metric families into an underlying wire protocol.
Required methods
fn encode<W: Write>(&self, _: &[MetricFamily], _: &mut W) -> Result<()>
[src]
encode
converts a slice of MetricFamily proto messages into target
format and writes the resulting lines to writer
. It returns the number
of bytes written and any error encountered. This function does not
perform checks on the content of the metric and label names,
i.e. invalid metric or label names will result in invalid text format
output.
fn format_type(&self) -> &str
[src]
format_type
returns target format.
Implementors
impl Encoder for ProtobufEncoder
[src]
fn encode<W: Write>(
&self,
metric_families: &[MetricFamily],
writer: &mut W
) -> Result<()>
[src]
&self,
metric_families: &[MetricFamily],
writer: &mut W
) -> Result<()>