[][src]Struct tacho::Scope

pub struct Scope { /* fields omitted */ }

Supports creation of scoped metrics.

Scopes 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

impl Clone for Scope[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.