[][src]Struct dipstick::Proxy

pub struct Proxy { /* fields omitted */ }

A dynamic proxy point for app and lib metrics. Decouples metrics definition from backend configuration. Allows defining metrics before a concrete type has been selected. Allows replacing metrics backend on the fly at runtime.

Methods

impl Proxy
[src]

pub fn new() -> Self
[src]

Create a new "private" metric proxy root. This is usually not what you want. Since this proxy will not be part of the standard proxy tree, it will need to be configured independently and since downstream code may not know about its existence this may never happen and metrics will not be proxyed anywhere. If you want to use the standard proxy tree, use #metric_proxy() instead.

pub fn set_target<T: InputScope + Send + Sync + 'static>(&self, target: T)
[src]

Replace target for this proxy and it's children.

pub fn unset_target(&self)
[src]

Replace target for this proxy and it's children.

pub fn set_default_target<T: InputScope + Send + Sync + 'static>(target: T)
[src]

Replace target for this proxy and it's children.

pub fn unset_default_target(&self)
[src]

Replace target for this proxy and it's children.

Trait Implementations

impl InputScope for Proxy
[src]

fn new_metric(&self, name: MetricName, kind: InputKind) -> InputMetric
[src]

Lookup or create a proxy stub for the requested metric.

fn counter(&self, name: &str) -> Counter
[src]

Define a Counter.

fn marker(&self, name: &str) -> Marker
[src]

Define a Marker.

fn timer(&self, name: &str) -> Timer
[src]

Define a Timer.

fn gauge(&self, name: &str) -> Gauge
[src]

Define a Gauge.

fn level(&self, name: &str) -> Level
[src]

Define a Level.

impl Flush for Proxy
[src]

impl<S: AsRef<str>> From<S> for Proxy
[src]

impl Default for Proxy
[src]

fn default() -> Self
[src]

Return the default root metric proxy.

impl Clone for Proxy
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Proxy
[src]

Auto Trait Implementations

impl Send for Proxy

impl Sync for Proxy

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]