Module parser

Module parser 

Source
Expand description

Nom based line parser for the exposition format specified at Prometheus documentation

Structs§

Comment
Represents parsed type or help comments for each metric. See examples at try_read_comment for more details.
LabelList
List of labels for a SampleData. See examples at try_read_sample for more details.
SampleData
Represents a parsed metric sample. See examples at try_read_sample for more details.

Enums§

CommentType
If it is a type or help comment. More details: comments, help text, and type information.

Functions§

try_read_comment
Tries to parse a &str line as a comment and returns Comment if it succeeds.
try_read_sample
Tries to parse a &str line as a sample and returns SampleData containg the metric name, labels and value if it succeeds.