pub struct MeasurementData {
pub epoch: u32,
pub name: String,
pub timestamp: f64,
pub val: f64,
pub key_values: HashMap<String, String>,
}
Fields§
§epoch: u32
§name: String
§timestamp: f64
§val: f64
§key_values: HashMap<String, String>
Implementations§
Source§impl MeasurementData
impl MeasurementData
Sourcepub fn matches_key_values(&self, criteria: &[(String, String)]) -> bool
pub fn matches_key_values(&self, criteria: &[(String, String)]) -> bool
Checks if this measurement matches all the specified key-value criteria.
Returns true if all key-value pairs in criteria
exist in this measurement
with matching values.
Sourcepub fn key_values_is_superset_of(&self, criteria: &[(String, String)]) -> bool
pub fn key_values_is_superset_of(&self, criteria: &[(String, String)]) -> bool
Checks if this measurement’s key-values form a superset of the given criteria.
In other words, verifies that criteria ⊆ measurement.key_values.
Returns true if all key-value pairs in criteria
exist in this measurement’s
key_values with matching values.
Trait Implementations§
Source§impl Debug for MeasurementData
impl Debug for MeasurementData
Source§impl PartialEq for MeasurementData
impl PartialEq for MeasurementData
impl StructuralPartialEq for MeasurementData
Auto Trait Implementations§
impl Freeze for MeasurementData
impl RefUnwindSafe for MeasurementData
impl Send for MeasurementData
impl Sync for MeasurementData
impl Unpin for MeasurementData
impl UnwindSafe for MeasurementData
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
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more