Struct openmetrics_parser::Sample
source · pub struct Sample<ValueType> {
pub timestamp: Option<Timestamp>,
pub value: ValueType,
/* private fields */
}
Fields§
§timestamp: Option<Timestamp>
§value: ValueType
Implementations§
source§impl<ValueType> Sample<ValueType>where
ValueType: RenderableMetricValue + Clone,
impl<ValueType> Sample<ValueType>where ValueType: RenderableMetricValue + Clone,
pub fn new( label_values: Vec<String>, timestamp: Option<Timestamp>, value: ValueType ) -> Self
pub fn without_label(&self, label_name: &str) -> Result<Self, ParseError>
pub fn get_labelset(&self) -> Result<LabelSet<'_>, ParseError>
Trait Implementations§
Auto Trait Implementations§
impl<ValueType> RefUnwindSafe for Sample<ValueType>where ValueType: RefUnwindSafe,
impl<ValueType> Send for Sample<ValueType>where ValueType: Send,
impl<ValueType> Sync for Sample<ValueType>where ValueType: Sync,
impl<ValueType> Unpin for Sample<ValueType>where ValueType: Unpin,
impl<ValueType> UnwindSafe for Sample<ValueType>where ValueType: UnwindSafe,
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