pub struct Row { /* private fields */ }Expand description
A row includes a data point along with properties to identify a kind of metric.
Implementations§
Source§impl Row
impl Row
Sourcepub fn with_labels(
metric: impl Into<String>,
labels: Vec<Label>,
data_point: DataPoint,
) -> Self
pub fn with_labels( metric: impl Into<String>, labels: Vec<Label>, data_point: DataPoint, ) -> Self
Creates a new Row with labels.
Sourcepub fn data_point(&self) -> DataPoint
pub fn data_point(&self) -> DataPoint
Gets the data point.
Sourcepub fn set_metric(&mut self, metric: impl Into<String>)
pub fn set_metric(&mut self, metric: impl Into<String>)
Sets the metric name.
Sourcepub fn set_labels(&mut self, labels: Vec<Label>)
pub fn set_labels(&mut self, labels: Vec<Label>)
Sets the labels.
Sourcepub fn set_data_point(&mut self, data_point: DataPoint)
pub fn set_data_point(&mut self, data_point: DataPoint)
Sets the data point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnwindSafe for Row
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