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