Skip to main content

RateKey

Trait RateKey 

pub trait RateKey:
    Hash
    + Eq
    + Clone
    + Debug
    + Send
    + Sync
    + 'static {
    // Provided method
    fn attributes(&self) -> impl Iterator<Item = KeyValue> { ... }
}
Available on crate feature net only.
Expand description

A key to rate limit on: the bucket-map key of a KeyedRatePolicy.

Provided Methods§

fn attributes(&self) -> impl Iterator<Item = KeyValue>

Available on crate feature opentelemetry only.

Telemetry attributes identifying this key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl RateKey for IpAddr

§

fn attributes(&self) -> impl Iterator<Item = KeyValue>

Available on crate feature opentelemetry only.
§

impl RateKey for u64

Implementors§

§

impl RateKey for String