Struct influxive_core::Metric
source · pub struct Metric {
pub timestamp: SystemTime,
pub name: StringType,
pub fields: Vec<(StringType, DataType)>,
pub tags: Vec<(StringType, DataType)>,
}
Expand description
A metric to record in the influxdb instance.
Fields§
§timestamp: SystemTime
The timestamp for this metric report.
name: StringType
The name of this metric report.
fields: Vec<(StringType, DataType)>
The fields associated with this metric report.
The tags associated with this metric report.
Implementations§
source§impl Metric
impl Metric
sourcepub fn new<N: Into<StringType>>(timestamp: SystemTime, name: N) -> Metric
pub fn new<N: Into<StringType>>(timestamp: SystemTime, name: N) -> Metric
Construct a new metric report to be sent to InfluxDB.
sourcepub fn with_field<N, V>(self, name: N, value: V) -> Self
pub fn with_field<N, V>(self, name: N, value: V) -> Self
Add a field to this metric report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more