Struct prometheus::proto::MetricFamily
source · [−]pub struct MetricFamily { /* private fields */ }
Implementations
sourceimpl MetricFamily
impl MetricFamily
pub fn new() -> MetricFamily
👎 Deprecated since 0.5.1:
Use default()
pub fn clear_name(&mut self)
pub fn set_name(&mut self, v: String)
pub fn get_name(&self) -> &str
pub fn set_help(&mut self, v: String)
pub fn get_help(&self) -> &str
pub fn set_field_type(&mut self, v: MetricType)
pub fn get_field_type(&self) -> MetricType
pub fn clear_metric(&mut self)
👎 Deprecated since 0.5.1:
This method is protobuf specific and will be removed in a future version
pub fn set_metric(&mut self, v: Vec<Metric>)
pub fn mut_metric(&mut self) -> &mut Vec<Metric>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn take_metric(&mut self) -> Vec<Metric>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_metric(&self) -> &[Metric]
Trait Implementations
sourceimpl Clone for MetricFamily
impl Clone for MetricFamily
sourcefn clone(&self) -> MetricFamily
fn clone(&self) -> MetricFamily
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MetricFamily
impl Debug for MetricFamily
sourceimpl Default for MetricFamily
impl Default for MetricFamily
sourcefn default() -> MetricFamily
fn default() -> MetricFamily
Returns the “default value” for a type. Read more
sourceimpl PartialEq<MetricFamily> for MetricFamily
impl PartialEq<MetricFamily> for MetricFamily
sourcefn eq(&self, other: &MetricFamily) -> bool
fn eq(&self, other: &MetricFamily) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MetricFamily) -> bool
fn ne(&self, other: &MetricFamily) -> bool
This method tests for !=
.
impl StructuralPartialEq for MetricFamily
Auto Trait Implementations
impl RefUnwindSafe for MetricFamily
impl Send for MetricFamily
impl Sync for MetricFamily
impl Unpin for MetricFamily
impl UnwindSafe for MetricFamily
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