pub trait PrometheusDeserializable: Sized {
// Required method
fn from_prometheus(
input: &str,
now: DurationSinceUnixEpoch,
) -> Result<Self, PrometheusDeserializationError>;
}Required Methods§
Sourcefn from_prometheus(
input: &str,
now: DurationSinceUnixEpoch,
) -> Result<Self, PrometheusDeserializationError>
fn from_prometheus( input: &str, now: DurationSinceUnixEpoch, ) -> Result<Self, PrometheusDeserializationError>
Parse a Prometheus exposition text format string into Self.
now is used as the sample timestamp when the exposition text does not
include a timestamp for a given sample.
§Errors
Returns an error if the input cannot be parsed or contains unsupported or unknown metric types/values.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".