Trait relay_statsd::prelude::Compat
pub trait Compat {
// Required methods
fn time_duration_with_tags<'a>(
&'a self,
key: &'a str,
val: Duration
) -> MetricBuilder<'a, 'a, Timer>;
fn gauge_f64_with_tags<'a>(
&'a self,
key: &'a str,
val: f64
) -> MetricBuilder<'a, 'a, Gauge>;
fn mark_with_tags<'a>(
&'a self,
key: &'a str
) -> MetricBuilder<'a, 'a, Meter>;
fn histogram_duration_with_tags<'a>(
&'a self,
key: &'a str,
val: Duration
) -> MetricBuilder<'a, 'a, Histogram>;
// Provided methods
fn time_duration(
&self,
key: &str,
val: Duration
) -> Result<Timer, MetricError> { ... }
fn gauge_f64(&self, key: &str, val: f64) -> Result<Gauge, MetricError> { ... }
fn mark(&self, key: &str) -> Result<Meter, MetricError> { ... }
fn histogram_duration(
&self,
key: &str,
val: Duration
) -> Result<Histogram, MetricError> { ... }
}
Expand description
Backwards compatibility shim for removed and deprecated methods.
To allow people time to migrate, the removed methods are implemented here. These methods should be considered deprecated and not viable to use long-term (this trait will be removed in a future release).
For more information about how to migrate away from the methods in this
trait, see the MIGRATION.md
file in the root of the repository.
Required Methods§
👎Deprecated: Use
client.time_with_tags(key, val)
👎Deprecated: Use
client.gauge_with_tags(key, val)
👎Deprecated: Use
client.meter_with_tags(key, 1)
👎Deprecated: Use
client.histogram_with_tags(key, val)
Provided Methods§
fn time_duration(&self, key: &str, val: Duration) -> Result<Timer, MetricError>
👎Deprecated: Use
client.time(key, val)
fn gauge_f64(&self, key: &str, val: f64) -> Result<Gauge, MetricError>
👎Deprecated: Use
client.gauge(key, val)
fn mark(&self, key: &str) -> Result<Meter, MetricError>
👎Deprecated: Use
client.meter(key, 1)
fn histogram_duration( &self, key: &str, val: Duration ) -> Result<Histogram, MetricError>
👎Deprecated: Use
client.histogram(key, val)