pub struct CardinalityLimit {
pub id: String,
pub passive: bool,
pub report: bool,
pub window: SlidingWindow,
pub limit: u32,
pub scope: CardinalityScope,
pub namespace: Option<MetricNamespace>,
}
Expand description
A cardinality limit.
Fields§
§id: String
Unique identifier of the cardinality limit.
passive: bool
Whether this is a passive limit.
Passive limits are tracked separately to normal limits and are not enforced, but still evaluated.
report: bool
If true
additional reporting of cardinality is enabled.
The cardinality limiter will keep track of every tracked limit
and record the current cardinality. The reported data is not per limit
but per scope. For example if Self::scope
is set to CardinalityScope::Name
,
the current cardinality for each metric name is reported.
window: SlidingWindow
The sliding window to enforce the cardinality limits in.
limit: u32
The cardinality limit.
scope: CardinalityScope
Scope which the limit applies to.
namespace: Option<MetricNamespace>
Metric namespace the limit applies to.
No namespace means this specific limit is enforced across all namespaces.
Trait Implementations§
source§impl Clone for CardinalityLimit
impl Clone for CardinalityLimit
source§fn clone(&self) -> CardinalityLimit
fn clone(&self) -> CardinalityLimit
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CardinalityLimit
impl Debug for CardinalityLimit
source§impl<'de> Deserialize<'de> for CardinalityLimit
impl<'de> Deserialize<'de> for CardinalityLimit
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for CardinalityLimit
impl Hash for CardinalityLimit
source§impl Ord for CardinalityLimit
impl Ord for CardinalityLimit
source§fn cmp(&self, other: &CardinalityLimit) -> Ordering
fn cmp(&self, other: &CardinalityLimit) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CardinalityLimit
impl PartialEq for CardinalityLimit
source§impl PartialOrd for CardinalityLimit
impl PartialOrd for CardinalityLimit
source§impl Serialize for CardinalityLimit
impl Serialize for CardinalityLimit
impl Eq for CardinalityLimit
impl StructuralPartialEq for CardinalityLimit
Auto Trait Implementations§
impl Freeze for CardinalityLimit
impl RefUnwindSafe for CardinalityLimit
impl Send for CardinalityLimit
impl Sync for CardinalityLimit
impl Unpin for CardinalityLimit
impl UnwindSafe for CardinalityLimit
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more