|
|
@@ -243,6 +243,7 @@ pub enum OwnedValue { |
|
|
|
Boolean(bool) |
|
|
|
} |
|
|
|
|
|
|
|
#[derive(Clone)] |
|
|
|
pub struct OwnedMeasurement { |
|
|
|
pub key: &'static str, |
|
|
|
pub timestamp: Option<i64>, |
|
|
@@ -281,6 +282,11 @@ impl OwnedMeasurement { |
|
|
|
self.timestamp = Some(timestamp); |
|
|
|
self |
|
|
|
} |
|
|
|
|
|
|
|
pub fn set_tag(mut self, key: &'static str, value: &'static str) -> Self { |
|
|
|
*self.tags.entry(key).or_insert(value) = value; |
|
|
|
self |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
pub fn dur_nanos(d: ::std::time::Duration) -> i64 { |
|
|
|