pub struct MetricsSample {
pub scope: Cow<'static, str>,
pub metric: &'static str,
pub reading: Reading,
pub kind: MetricKind,
}Fields§
§scope: Cow<'static, str>§metric: &'static str§reading: Reading§kind: MetricKindImplementations§
Source§impl MetricsSample
impl MetricsSample
pub fn heap( scope: impl Into<Cow<'static, str>>, metric: &'static str, bytes: ByteSize, ) -> Self
pub fn bytes( scope: impl Into<Cow<'static, str>>, metric: &'static str, bytes: ByteSize, ) -> Self
pub fn count( scope: impl Into<Cow<'static, str>>, metric: &'static str, count: u64, ) -> Self
pub fn counter( scope: impl Into<Cow<'static, str>>, metric: &'static str, count: u64, ) -> Self
pub fn ratio( scope: impl Into<Cow<'static, str>>, metric: &'static str, ratio: f64, ) -> Self
pub fn version( scope: impl Into<Cow<'static, str>>, metric: &'static str, version: u64, ) -> Self
pub fn duration( scope: impl Into<Cow<'static, str>>, metric: &'static str, duration: Duration, ) -> Self
pub fn level( scope: impl Into<Cow<'static, str>>, metric: &'static str, reading: Reading, ) -> Self
pub fn cumulative( scope: impl Into<Cow<'static, str>>, metric: &'static str, reading: Reading, ) -> Self
pub fn distribution( scope: impl Into<Cow<'static, str>>, metric: &'static str, reading: Reading, ) -> Self
Trait Implementations§
Source§impl Clone for MetricsSample
impl Clone for MetricsSample
Source§fn clone(&self) -> MetricsSample
fn clone(&self) -> MetricsSample
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MetricsSample
impl Debug for MetricsSample
Source§impl PartialEq for MetricsSample
impl PartialEq for MetricsSample
impl StructuralPartialEq for MetricsSample
Auto Trait Implementations§
impl Freeze for MetricsSample
impl RefUnwindSafe for MetricsSample
impl Send for MetricsSample
impl Sync for MetricsSample
impl Unpin for MetricsSample
impl UnsafeUnpin for MetricsSample
impl UnwindSafe for MetricsSample
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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