pub struct TaskExecutorMetrics { /* private fields */ }Expand description
Task Executor Metrics
Implementations§
Source§impl TaskExecutorMetrics
impl TaskExecutorMetrics
Sourcepub fn new_with_labels(labels: impl IntoLabels) -> Self
pub fn new_with_labels(labels: impl IntoLabels) -> Self
Creates a new instance of the metrics with the provided labels.
Unlike Self::default, this does not cache the result, so it can be used
to re-register metrics or register with different labels.
Sourcepub fn describe()
pub fn describe()
Describe all exposed metrics.
Internally, this calls the describe_* macros from the metrics crate
according to the metric type.
This is done only once, to avoid multiple describe calls to the same
recorder. If this is not preferred, you can call Self::force_describe
directly.
See: https://docs.rs/metrics/latest/metrics/index.html#macros
Sourcepub fn force_describe()
pub fn force_describe()
Unconditionally describes all metrics.
See Self::describe.
Trait Implementations§
Source§impl Clone for TaskExecutorMetrics
impl Clone for TaskExecutorMetrics
Source§fn clone(&self) -> TaskExecutorMetrics
fn clone(&self) -> TaskExecutorMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskExecutorMetrics
impl Debug for TaskExecutorMetrics
Source§impl Default for TaskExecutorMetrics
impl Default for TaskExecutorMetrics
Source§fn default() -> Self
fn default() -> Self
Creates a new instance of the metrics.
This initializes all metrics and registers them with the global recorder.
Metrics are described only once; see Self::describe.
The result is cached in a static OnceLock, so subsequent calls will
return a clone of the same instance.
Auto Trait Implementations§
impl Freeze for TaskExecutorMetrics
impl !RefUnwindSafe for TaskExecutorMetrics
impl Send for TaskExecutorMetrics
impl Sync for TaskExecutorMetrics
impl Unpin for TaskExecutorMetrics
impl !UnwindSafe for TaskExecutorMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> 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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 96 bytes