Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoder: fix docs #433

Merged
merged 1 commit into from Apr 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/encoder/mod.rs
Expand Up @@ -16,12 +16,11 @@ use crate::proto::MetricFamily;
/// An interface for encoding metric families into an underlying wire protocol.
pub trait Encoder {
/// `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
/// format and writes the resulting lines to `writer`. This function does not
/// perform checks on the content of the metrics and label names,
/// i.e. invalid metrics or label names will result in invalid text format
/// output.
fn encode<W: Write>(&self, _: &[MetricFamily], _: &mut W) -> Result<()>;
fn encode<W: Write>(&self, mfs: &[MetricFamily], writer: &mut W) -> Result<()>;

/// `format_type` returns target format.
fn format_type(&self) -> &str;
Expand Down