#[repr(i32)]pub enum Cardinality {
CARDINALITY_UNSPECIFIED = 0,
LOW = 1,
MEDIUM = 2,
HIGH = 3,
UNBOUNDED = 4,
}Variants§
Implementations§
Source§impl Cardinality
impl Cardinality
Sourcepub const Unspecified: Cardinality = Self::CARDINALITY_UNSPECIFIED
pub const Unspecified: Cardinality = Self::CARDINALITY_UNSPECIFIED
Short-name alias for CARDINALITY_UNSPECIFIED.
Sourcepub const Low: Cardinality = Self::LOW
pub const Low: Cardinality = Self::LOW
Short-name alias for LOW.
Sourcepub const Medium: Cardinality = Self::MEDIUM
pub const Medium: Cardinality = Self::MEDIUM
Short-name alias for MEDIUM.
Sourcepub const High: Cardinality = Self::HIGH
pub const High: Cardinality = Self::HIGH
Short-name alias for HIGH.
Sourcepub const Unbounded: Cardinality = Self::UNBOUNDED
pub const Unbounded: Cardinality = Self::UNBOUNDED
Short-name alias for UNBOUNDED.
Sourcepub const fn cap(self) -> u64
pub const fn cap(self) -> u64
Numeric cap: the maximum distinct value count permitted at this
level. Returns u64::MAX for Unbounded.
Sourcepub const fn is_label_compatible(self) -> bool
pub const fn is_label_compatible(self) -> bool
True if this cardinality is permitted on a FieldKind::Label
field.
Sourcepub const fn is_measurement_compatible(self) -> bool
pub const fn is_measurement_compatible(self) -> bool
True if this cardinality is permitted on a
FieldKind::Measurement field.
Trait Implementations§
Source§impl Clone for Cardinality
impl Clone for Cardinality
Source§fn clone(&self) -> Cardinality
fn clone(&self) -> Cardinality
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Cardinality
impl Debug for Cardinality
Source§impl Default for Cardinality
impl Default for Cardinality
Source§fn default() -> Cardinality
fn default() -> Cardinality
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Cardinality
impl<'de> Deserialize<'de> for Cardinality
Source§fn deserialize<D>(d: D) -> Result<Cardinality, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Cardinality, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Enumeration for Cardinality
impl Enumeration for Cardinality
Source§fn from_i32(value: i32) -> Option<Cardinality>
fn from_i32(value: i32) -> Option<Cardinality>
Convert from an
i32 wire value to the enum. Read moreSource§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.Source§fn from_proto_name(name: &str) -> Option<Cardinality>
fn from_proto_name(name: &str) -> Option<Cardinality>
Look up a variant by its protobuf name string. Read more
Source§fn values() -> &'static [Cardinality]
fn values() -> &'static [Cardinality]
All known variants of this enum, in proto declaration order. Read more
Source§impl FromStr for Cardinality
impl FromStr for Cardinality
Source§type Err = UnknownVariant
type Err = UnknownVariant
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<Cardinality, <Cardinality as FromStr>::Err>
fn from_str(s: &str) -> Result<Cardinality, <Cardinality as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for Cardinality
impl Hash for Cardinality
Source§impl Ord for Cardinality
impl Ord for Cardinality
Source§fn cmp(&self, other: &Cardinality) -> Ordering
fn cmp(&self, other: &Cardinality) -> Ordering
1.21.0 (const: unstable) · 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 Cardinality
impl PartialEq for Cardinality
Source§fn eq(&self, other: &Cardinality) -> bool
fn eq(&self, other: &Cardinality) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Cardinality
impl PartialOrd for Cardinality
Source§impl Serialize for Cardinality
impl Serialize for Cardinality
Source§fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Cardinality
impl Eq for Cardinality
impl StructuralPartialEq for Cardinality
Auto Trait Implementations§
impl Freeze for Cardinality
impl RefUnwindSafe for Cardinality
impl Send for Cardinality
impl Sync for Cardinality
impl Unpin for Cardinality
impl UnsafeUnpin for Cardinality
impl UnwindSafe for Cardinality
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.