Struct metrics::Key [−][src]
pub struct Key { /* fields omitted */ }
Expand description
A metric identifier.
Implementations
impl Key
[src]
impl Key
[src]pub fn from_name<N>(name: N) -> Self where
N: Into<SharedString>,
[src]
pub fn from_name<N>(name: N) -> Self where
N: Into<SharedString>,
[src]Creates a Key
from a name.
pub fn from_parts<N, L>(name: N, labels: L) -> Self where
N: Into<SharedString>,
L: IntoLabels,
[src]
pub fn from_parts<N, L>(name: N, labels: L) -> Self where
N: Into<SharedString>,
L: IntoLabels,
[src]Creates a Key
from a name and set of labels.
pub fn from_static_labels<N>(name: N, labels: &'static [Label]) -> Self where
N: Into<SharedString>,
[src]
pub fn from_static_labels<N>(name: N, labels: &'static [Label]) -> Self where
N: Into<SharedString>,
[src]Creates a Key
from a non-static name and a static set of labels.
pub const fn from_static_name(name: &'static str) -> Self
[src]
pub const fn from_static_name(name: &'static str) -> Self
[src]Creates a Key
from a static name.
This function is const
, so it can be used in a static context.
pub const fn from_static_parts(
name: &'static str,
labels: &'static [Label]
) -> Self
[src]
pub const fn from_static_parts(
name: &'static str,
labels: &'static [Label]
) -> Self
[src]Creates a Key
from a static name and static set of labels.
This function is const
, so it can be used in a static context.
pub fn into_parts(self) -> (SharedString, Vec<Label>)
[src]
pub fn into_parts(self) -> (SharedString, Vec<Label>)
[src]Consumes this Key
, returning the name parts and any labels.
pub fn with_extra_labels(&self, extra_labels: Vec<Label>) -> Self
[src]
pub fn with_extra_labels(&self, extra_labels: Vec<Label>) -> Self
[src]Clones this Key
, and expands the existing set of labels.
Trait Implementations
impl<N, L> From<(N, L)> for Key where
N: Into<SharedString>,
L: IntoLabels,
[src]
impl<N, L> From<(N, L)> for Key where
N: Into<SharedString>,
L: IntoLabels,
[src]impl Ord for Key
[src]
impl Ord for Key
[src]impl PartialOrd<Key> for Key
[src]
impl PartialOrd<Key> for Key
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Key
[src]
Auto Trait Implementations
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more