pub struct ValueDescriptor {
pub key: String,
pub value_type: i32,
pub metric_kind: i32,
pub unit: String,
}
Expand description
A descriptor for the value columns in a data point.
Fields§
§key: String
The value key.
value_type: i32
The value type.
metric_kind: i32
The value stream kind.
unit: String
The unit in which time_series
point values are reported. unit
follows the UCUM format for units as seen in
https://unitsofmeasure.org/ucum.html.
unit
is only valid if value_type
is INTEGER, DOUBLE, DISTRIBUTION.
Implementations§
source§impl ValueDescriptor
impl ValueDescriptor
sourcepub fn value_type(&self) -> ValueType
pub fn value_type(&self) -> ValueType
Returns the enum value of value_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_value_type(&mut self, value: ValueType)
pub fn set_value_type(&mut self, value: ValueType)
Sets value_type
to the provided enum value.
sourcepub fn metric_kind(&self) -> MetricKind
pub fn metric_kind(&self) -> MetricKind
Returns the enum value of metric_kind
, or the default if the field is set to an invalid enum value.
sourcepub fn set_metric_kind(&mut self, value: MetricKind)
pub fn set_metric_kind(&mut self, value: MetricKind)
Sets metric_kind
to the provided enum value.
Trait Implementations§
source§impl Clone for ValueDescriptor
impl Clone for ValueDescriptor
source§fn clone(&self) -> ValueDescriptor
fn clone(&self) -> ValueDescriptor
Returns a copy of the value. Read more
1.0.0 · 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 ValueDescriptor
impl Debug for ValueDescriptor
source§impl Default for ValueDescriptor
impl Default for ValueDescriptor
source§impl Message for ValueDescriptor
impl Message for ValueDescriptor
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for ValueDescriptor
impl PartialEq for ValueDescriptor
source§fn eq(&self, other: &ValueDescriptor) -> bool
fn eq(&self, other: &ValueDescriptor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ValueDescriptor
Auto Trait Implementations§
impl Freeze for ValueDescriptor
impl RefUnwindSafe for ValueDescriptor
impl Send for ValueDescriptor
impl Sync for ValueDescriptor
impl Unpin for ValueDescriptor
impl UnwindSafe for ValueDescriptor
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
§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>
Wrap the input message
T
in a tonic::Request