Enum google_api_proto::google::api::metric_descriptor::MetricKind
source · #[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<Self>
pub fn from_str_name(value: &str) -> Option<Self>
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 From<MetricKind> for i32
impl From<MetricKind> for i32
source§fn from(value: MetricKind) -> i32
fn from(value: MetricKind) -> i32
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§fn eq(&self, other: &MetricKind) -> bool
fn eq(&self, other: &MetricKind) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MetricKind
impl PartialOrd for MetricKind
source§fn partial_cmp(&self, other: &MetricKind) -> Option<Ordering>
fn partial_cmp(&self, other: &MetricKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for MetricKind
impl TryFrom<i32> for MetricKind
§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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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