Struct metrics_util::CompositeKey
source · [−]pub struct CompositeKey(_, _);
Expand description
A composite key that stores both the metric key and the metric kind.
Implementations
sourceimpl 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
sourceimpl Clone for CompositeKey
impl Clone for CompositeKey
sourcefn clone(&self) -> CompositeKey
fn clone(&self) -> CompositeKey
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 CompositeKey
impl Debug for CompositeKey
sourceimpl Hash for CompositeKey
impl Hash for CompositeKey
sourceimpl Ord for CompositeKey
impl Ord for CompositeKey
sourceimpl PartialEq<CompositeKey> for CompositeKey
impl PartialEq<CompositeKey> for CompositeKey
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &CompositeKey) -> bool
fn ne(&self, other: &CompositeKey) -> bool
This method tests for !=
.
sourceimpl PartialOrd<CompositeKey> for CompositeKey
impl PartialOrd<CompositeKey> for CompositeKey
sourcefn partial_cmp(&self, other: &CompositeKey) -> Option<Ordering>
fn partial_cmp(&self, other: &CompositeKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.