pub struct CounterValue {
pub created: Option<Timestamp>,
pub exemplar: Option<Exemplar>,
pub total: Option<Total>,
}๐Deprecated:
OpenMetrics protobuf support is deprecated. Use prometheus_protobuf instead.
Available on crate feature
openmetrics_protobuf only.Expand description
Value for COUNTER MetricPoint.
Fieldsยง
ยงcreated: Option<Timestamp>๐Deprecated:
OpenMetrics protobuf support is deprecated. Use prometheus_protobuf instead.
The time values began being collected for this counter. Optional.
exemplar: Option<Exemplar>๐Deprecated:
OpenMetrics protobuf support is deprecated. Use prometheus_protobuf instead.
Optional.
total: Option<Total>๐Deprecated:
OpenMetrics protobuf support is deprecated. Use prometheus_protobuf instead.
Required.
Trait Implementationsยง
Sourceยงimpl Clone for CounterValue
impl Clone for CounterValue
Sourceยงfn clone(&self) -> CounterValue
fn clone(&self) -> CounterValue
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 CounterValue
impl Debug for CounterValue
Sourceยงimpl Default for CounterValue
impl Default for CounterValue
Sourceยงimpl Message for CounterValue
impl Message for CounterValue
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 CounterValue
impl PartialEq for CounterValue
Sourceยงfn eq(&self, other: &CounterValue) -> bool
fn eq(&self, other: &CounterValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CounterValue
Auto Trait Implementationsยง
impl Freeze for CounterValue
impl RefUnwindSafe for CounterValue
impl Send for CounterValue
impl Sync for CounterValue
impl Unpin for CounterValue
impl UnsafeUnpin for CounterValue
impl UnwindSafe for CounterValue
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