pub struct TrieRootMetrics { /* private fields */ }metrics only.Expand description
Metrics for trie root calculation.
Implementations§
Source§impl TrieRootMetrics
impl TrieRootMetrics
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 TrieRootMetrics
impl Clone for TrieRootMetrics
Source§impl Debug for TrieRootMetrics
impl Debug for TrieRootMetrics
Source§impl Default for TrieRootMetrics
impl Default for TrieRootMetrics
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 !RefUnwindSafe for TrieRootMetrics
impl !UnwindSafe for TrieRootMetrics
impl Freeze for TrieRootMetrics
impl Send for TrieRootMetrics
impl Sync for TrieRootMetrics
impl Unpin for TrieRootMetrics
impl UnsafeUnpin for TrieRootMetrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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 moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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: 48 bytes