Struct metrics_util::CompositeKey
source · pub struct CompositeKey(/* private fields */);
Expand description
A composite key that stores both the metric key and the metric kind.
Implementations§
source§impl CompositeKey
impl CompositeKey
sourcepub const fn new(kind: MetricKind, key: Key) -> CompositeKey
pub const fn new(kind: MetricKind, key: Key) -> CompositeKey
Creates a new CompositeKey
.
sourcepub fn kind(&self) -> MetricKind
pub fn kind(&self) -> MetricKind
Gets the inner kind represented by this CompositeKey
.
sourcepub fn into_parts(self) -> (MetricKind, Key)
pub fn into_parts(self) -> (MetricKind, Key)
Takes the individual pieces of this CompositeKey
.
Trait Implementations§
source§impl Clone for CompositeKey
impl Clone for CompositeKey
source§fn clone(&self) -> CompositeKey
fn clone(&self) -> CompositeKey
Returns a copy of the value. Read more
1.0.0 · 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 CompositeKey
impl Debug for CompositeKey
source§impl Hash for CompositeKey
impl Hash for CompositeKey
source§impl Ord for CompositeKey
impl Ord for CompositeKey
source§fn cmp(&self, other: &CompositeKey) -> Ordering
fn cmp(&self, other: &CompositeKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CompositeKey
impl PartialEq for CompositeKey
source§fn eq(&self, other: &CompositeKey) -> bool
fn eq(&self, other: &CompositeKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CompositeKey
impl PartialOrd for CompositeKey
source§fn partial_cmp(&self, other: &CompositeKey) -> Option<Ordering>
fn partial_cmp(&self, other: &CompositeKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CompositeKey
impl StructuralEq for CompositeKey
impl StructuralPartialEq for CompositeKey
Auto Trait Implementations§
impl RefUnwindSafe for CompositeKey
impl Send for CompositeKey
impl Sync for CompositeKey
impl Unpin for CompositeKey
impl UnwindSafe for CompositeKey
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