Trait dipstick::Observe

source ·
pub trait Observe {
    type Inner;

    fn observe<F>(
        &self,
        metric: impl Deref<Target = InputMetric>,
        operation: F
    ) -> ObserveWhen<'_, Self::Inner, F>
    where
        F: Fn(Instant) -> MetricValue + Send + Sync + 'static,
        Self: Sized
; }
Expand description

Schedule a recurring task

Required Associated Types§

The inner type for the ObserveWhen.

The observe can be delegated to a different type then Self, however the latter is more common.

Required Methods§

Provide a source for a metric’s values.

Implementors§