[−][src]Trait dipstick::Observe
Schedule a recurring task
Associated Types
type Inner
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
#[must_use = "must specify when to observe"]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,
&self,
metric: impl Deref<Target = InputMetric>,
operation: F
) -> ObserveWhen<'_, Self::Inner, F> where
F: Fn(Instant) -> MetricValue + Send + Sync + 'static,
Self: Sized,
Provide a source for a metric's values.
Implementors
impl<T: InputScope + WithAttributes> Observe for T
[src]
type Inner = Self
fn observe<F>(
&self,
metric: impl Deref<Target = InputMetric>,
operation: F
) -> ObserveWhen<'_, Self, F> where
F: Fn(Instant) -> MetricValue + Send + Sync + 'static,
Self: Sized,
[src]
&self,
metric: impl Deref<Target = InputMetric>,
operation: F
) -> ObserveWhen<'_, Self, F> where
F: Fn(Instant) -> MetricValue + Send + Sync + 'static,
Self: Sized,