[−][src]Struct dipstick::Proxy
A dynamic proxy for app and lib metrics. Decouples metrics definition from backend configuration. Allows defining metrics before a concrete type is configured. Allows replacing metrics backend on the fly at runtime.
Implementations
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]
Use target()
Replace target for this proxy and its children.
pub fn target<T: InputScope + Send + Sync + 'static>(&self, target: T)
[src]
Replace target for this proxy and its children.
pub fn unset_target(&self)
[src]
Replace target for this proxy and its children.
pub fn set_default_target<T: InputScope + Send + Sync + 'static>(target: T)
[src]
Use default_target()
Install a new default target for all proxies.
pub fn default_target<T: InputScope + Send + Sync + 'static>(target: T)
[src]
Install a new default target for all proxies.
pub fn unset_default_target(&self)
[src]
Revert to initial state any installed default target for all proxies.
Trait Implementations
impl Clone for Proxy
[src]
impl Debug for Proxy
[src]
impl Default for Proxy
[src]
impl Flush for Proxy
[src]
impl<S: AsRef<str>> From<S> for Proxy
[src]
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]
fn marker(&self, name: &str) -> Marker
[src]
fn timer(&self, name: &str) -> Timer
[src]
fn gauge(&self, name: &str) -> Gauge
[src]
fn level(&self, name: &str) -> Level
[src]
Auto Trait Implementations
impl RefUnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnwindSafe for Proxy
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>,