Struct prometheus_client::metrics::counter::ConstCounter
source · pub struct ConstCounter<N = u64> { /* private fields */ }
Expand description
Implementations§
source§impl<N> ConstCounter<N>
impl<N> ConstCounter<N>
sourcepub fn new(value: N) -> Self
pub fn new(value: N) -> Self
Creates a new ConstCounter
.
Trait Implementations§
source§impl<N: Debug> Debug for ConstCounter<N>
impl<N: Debug> Debug for ConstCounter<N>
source§impl<N: Default> Default for ConstCounter<N>
impl<N: Default> Default for ConstCounter<N>
source§fn default() -> ConstCounter<N>
fn default() -> ConstCounter<N>
Returns the “default value” for a type. Read more
source§impl<N> EncodeMetric for ConstCounter<N>where
N: EncodeCounterValue,
impl<N> EncodeMetric for ConstCounter<N>where N: EncodeCounterValue,
source§fn encode(&self, encoder: MetricEncoder<'_, '_>) -> Result<(), Error>
fn encode(&self, encoder: MetricEncoder<'_, '_>) -> Result<(), Error>
Encode the given instance in the OpenMetrics text encoding.
source§fn metric_type(&self) -> MetricType
fn metric_type(&self) -> MetricType
The OpenMetrics metric type of the instance.
source§impl<N> TypedMetric for ConstCounter<N>
impl<N> TypedMetric for ConstCounter<N>
source§const TYPE: MetricType = MetricType::Counter
const TYPE: MetricType = MetricType::Counter
The OpenMetrics metric type.
Auto Trait Implementations§
impl<N> RefUnwindSafe for ConstCounter<N>where N: RefUnwindSafe,
impl<N> Send for ConstCounter<N>where N: Send,
impl<N> Sync for ConstCounter<N>where N: Sync,
impl<N> Unpin for ConstCounter<N>where N: Unpin,
impl<N> UnwindSafe for ConstCounter<N>where N: UnwindSafe,
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