pub struct MetricEnvelope {
pub measurements: Vec<MetricMeasurement>,
}Expand description
Payload stored in a mark using METRIC_DATA_SCHEMA_NAME.
Fields§
§measurements: Vec<MetricMeasurement>Metric recording operations that must be accepted or rejected atomically.
Implementations§
Source§impl MetricEnvelope
impl MetricEnvelope
Sourcepub fn validate(&self) -> Result<(), MetricValidationError>
pub fn validate(&self) -> Result<(), MetricValidationError>
Validate every measurement and their shared instrument descriptors.
§Errors
Returns a MetricValidationError when any field violates the Relay
metric schema. The complete envelope must be rejected on error.
Sourcepub fn validated_measurements(
&self,
) -> Result<Vec<ValidatedMetricMeasurement>, MetricValidationError>
pub fn validated_measurements( &self, ) -> Result<Vec<ValidatedMetricMeasurement>, MetricValidationError>
Parse this wire envelope into metric measurements safe for export.
§Errors
Returns a MetricValidationError when any field violates the Relay
metric schema. The complete envelope is rejected on error.
Trait Implementations§
Source§impl Clone for MetricEnvelope
impl Clone for MetricEnvelope
Source§fn clone(&self) -> MetricEnvelope
fn clone(&self) -> MetricEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricEnvelope
impl Debug for MetricEnvelope
Source§impl<'de> Deserialize<'de> for MetricEnvelope
impl<'de> Deserialize<'de> for MetricEnvelope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MetricEnvelope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MetricEnvelope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MetricEnvelope
impl PartialEq for MetricEnvelope
Source§impl Serialize for MetricEnvelope
impl Serialize for MetricEnvelope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for MetricEnvelope
Auto Trait Implementations§
impl Freeze for MetricEnvelope
impl RefUnwindSafe for MetricEnvelope
impl Send for MetricEnvelope
impl Sync for MetricEnvelope
impl Unpin for MetricEnvelope
impl UnsafeUnpin for MetricEnvelope
impl UnwindSafe for MetricEnvelope
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