Struct prometheus::proto::Metric
source · [−]pub struct Metric { /* private fields */ }
Implementations
sourceimpl Metric
impl Metric
pub fn new() -> Metric
👎 Deprecated since 0.5.1:
Use default()
pub fn set_label(&mut self, v: Vec<LabelPair>)
pub fn mut_label(&mut self) -> &mut [LabelPair]
pub fn take_label(&mut self) -> Vec<LabelPair>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_label(&self) -> &[LabelPair]
pub fn set_gauge(&mut self, v: Gauge)
pub fn get_gauge(&self) -> &Gauge
pub fn set_counter(&mut self, v: Counter)
pub fn get_counter(&self) -> &Counter
pub fn set_summary(&mut self, v: Summary)
pub fn get_summary(&self) -> &Summary
pub fn set_untyped(&mut self, v: Untyped)
👎 Deprecated since 0.5.1:
This method is protobuf specific and will be removed in a future version
pub fn get_untyped(&self) -> &Untyped
👎 Deprecated since 0.5.1:
This method is protobuf specific and will be removed in a future version
pub fn set_histogram(&mut self, v: Histogram)
pub fn get_histogram(&self) -> &Histogram
pub fn set_timestamp_ms(&mut self, v: i64)
pub fn get_timestamp_ms(&self) -> i64
Trait Implementations
impl StructuralPartialEq for Metric
Auto Trait Implementations
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more