Skip to main content

made_core/value_objects/
prometheus_text.rs

1/// One complete Prometheus text exposition snapshot.
2#[derive(Clone, Debug, Default, PartialEq, Eq)]
3pub struct PrometheusText(String);
4
5impl PrometheusText {
6    #[must_use]
7    pub fn new(value: impl Into<String>) -> Self {
8        Self(value.into())
9    }
10
11    #[must_use]
12    pub fn as_str(&self) -> &str {
13        &self.0
14    }
15}