#[repr(i32)]pub enum MetricKind {
Unspecified = 0,
Gauge = 1,
Delta = 2,
Cumulative = 3,
}
Expand description
The kind of measurement. It describes how the data is reported. For information on setting the start time and end time based on the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
Variants§
Unspecified = 0
Do not use this default value.
Gauge = 1
An instantaneous measurement of a value.
Delta = 2
The change in a value during a time interval.
Cumulative = 3
A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.
Implementations§
Source§impl MetricKind
impl MetricKind
Source§impl MetricKind
impl MetricKind
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<MetricKind>
pub fn from_str_name(value: &str) -> Option<MetricKind>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for MetricKind
impl Clone for MetricKind
Source§fn clone(&self) -> MetricKind
fn clone(&self) -> MetricKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MetricKind
impl Debug for MetricKind
Source§impl Default for MetricKind
impl Default for MetricKind
Source§fn default() -> MetricKind
fn default() -> MetricKind
Source§impl Hash for MetricKind
impl Hash for MetricKind
Source§impl Ord for MetricKind
impl Ord for MetricKind
Source§fn cmp(&self, other: &MetricKind) -> Ordering
fn cmp(&self, other: &MetricKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MetricKind
impl PartialEq for MetricKind
Source§impl PartialOrd for MetricKind
impl PartialOrd for MetricKind
Source§impl TryFrom<i32> for MetricKind
impl TryFrom<i32> for MetricKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<MetricKind, UnknownEnumValue>
fn try_from(value: i32) -> Result<MetricKind, UnknownEnumValue>
impl Copy for MetricKind
impl Eq for MetricKind
impl StructuralPartialEq for MetricKind
Auto Trait Implementations§
impl Freeze for MetricKind
impl RefUnwindSafe for MetricKind
impl Send for MetricKind
impl Sync for MetricKind
impl Unpin for MetricKind
impl UnwindSafe for MetricKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request