pub struct ByNamespace<T> {
pub sessions: T,
pub transactions: T,
pub spans: T,
pub custom: T,
pub stats: T,
pub unsupported: T,
}
Expand description
Utility to store information for each MetricNamespace
.
Fields§
§sessions: T
Value for the MetricNamespace::Sessions
namespace.
transactions: T
Value for the MetricNamespace::Transactions
namespace.
spans: T
Value for the MetricNamespace::Spans
namespace.
custom: T
Value for the MetricNamespace::Custom
namespace.
stats: T
Value for the MetricNamespace::Stats
namespace.
unsupported: T
Value for the MetricNamespace::Unsupported
namespace.
Implementations§
Source§impl<T> ByNamespace<T>
impl<T> ByNamespace<T>
Sourcepub fn get(&self, namespace: MetricNamespace) -> &T
pub fn get(&self, namespace: MetricNamespace) -> &T
Returns a reference for the value stored for namespace
.
Sourcepub fn get_mut(&mut self, namespace: MetricNamespace) -> &mut T
pub fn get_mut(&mut self, namespace: MetricNamespace) -> &mut T
Returns a mutable reference for the value stored for namespace
.
Trait Implementations§
Source§impl<T: AddAssign> AddAssign for ByNamespace<T>
impl<T: AddAssign> AddAssign for ByNamespace<T>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl<T: Clone> Clone for ByNamespace<T>
impl<T: Clone> Clone for ByNamespace<T>
Source§fn clone(&self) -> ByNamespace<T>
fn clone(&self) -> ByNamespace<T>
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<T: Default> Default for ByNamespace<T>
impl<T: Default> Default for ByNamespace<T>
Source§fn default() -> ByNamespace<T>
fn default() -> ByNamespace<T>
Returns the “default value” for a type. Read more
Source§impl<T: Hash> Hash for ByNamespace<T>
impl<T: Hash> Hash for ByNamespace<T>
Source§impl<T> IntoIterator for ByNamespace<T>
impl<T> IntoIterator for ByNamespace<T>
Source§impl<T: Ord> Ord for ByNamespace<T>
impl<T: Ord> Ord for ByNamespace<T>
Source§fn cmp(&self, other: &ByNamespace<T>) -> Ordering
fn cmp(&self, other: &ByNamespace<T>) -> 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<T: PartialEq> PartialEq for ByNamespace<T>
impl<T: PartialEq> PartialEq for ByNamespace<T>
Source§impl<T: PartialOrd> PartialOrd for ByNamespace<T>
impl<T: PartialOrd> PartialOrd for ByNamespace<T>
Source§impl<T: SubAssign> SubAssign for ByNamespace<T>
impl<T: SubAssign> SubAssign for ByNamespace<T>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl<T: Copy> Copy for ByNamespace<T>
impl<T: Eq> Eq for ByNamespace<T>
impl<T> StructuralPartialEq for ByNamespace<T>
Auto Trait Implementations§
impl<T> Freeze for ByNamespace<T>where
T: Freeze,
impl<T> RefUnwindSafe for ByNamespace<T>where
T: RefUnwindSafe,
impl<T> Send for ByNamespace<T>where
T: Send,
impl<T> Sync for ByNamespace<T>where
T: Sync,
impl<T> Unpin for ByNamespace<T>where
T: Unpin,
impl<T> UnwindSafe for ByNamespace<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more