[−][src]Struct tacho::Scope
Supports creation of scoped metrics.
Scope
s may be cloned without copying the underlying metrics registry.
Labels may be attached to the scope so that all metrics created by the Scope
are
labeled.
Implementations
impl Scope
[src]
pub fn labels(&self) -> &BTreeMap<&'static str, String>
[src]
Accesses scoping labels.
pub fn labeled<D: Display>(self, k: &'static str, v: D) -> Self
[src]
Adds a label into scope (potentially overwriting).
pub fn prefixed(self, value: &'static str) -> Self
[src]
Appends a prefix to the current scope.
pub fn counter(&self, name: &'static str) -> Counter
[src]
Creates a Counter with the given name.
pub fn gauge(&self, name: &'static str) -> Gauge
[src]
Creates a Gauge with the given name.
pub fn stat(&self, name: &'static str) -> Stat
[src]
Creates a Stat with the given name.
The underlying histogram is automatically resized as values are added.
pub fn timer_us(&self, name: &'static str) -> Timer
[src]
pub fn timer_ms(&self, name: &'static str) -> Timer
[src]
pub fn stat_with_bounds(&self, name: &'static str, low: u64, high: u64) -> Stat
[src]
Creates a Stat with the given name and histogram paramters.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,