pub trait CardinalityItem {
    // Required methods
    fn to_hash(&self) -> u32;
    fn namespace(&self) -> Option<MetricNamespace>;
    fn name(&self) -> &MetricName;
}
Expand description

Unit of operation for the cardinality limiter.

Required Methods§

source

fn to_hash(&self) -> u32

Transforms this item into a consistent hash.

source

fn namespace(&self) -> Option<MetricNamespace>

Metric namespace of the item.

If this method returns None the item is automatically rejected.

source

fn name(&self) -> &MetricName

Name of the item.

Implementors§