#[non_exhaustive]#[repr(i32)]pub enum FieldKind {
Unspecified = 0,
Label = 1,
Attribute = 2,
Measurement = 3,
TraceId = 4,
SpanId = 5,
ParentSpanId = 6,
TimestampNs = 7,
DurationNs = 8,
Forensic = 9,
}Expand description
Role of a field on a wide event. Drives codegen, OTel mapping, and lints.
See 10-data-model.md § 4.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unspecified = 0
Never appears in a well-formed schema.
Label = 1
Bounded dimension; safe as metric/span attribute.
Attribute = 2
Free-form; never a metric dimension; in log/span body.
Measurement = 3
Numeric; emitted as a metric data point.
TraceId = 4
Lifted to envelope trace_id.
SpanId = 5
Lifted to envelope span_id.
ParentSpanId = 6
Lifted to envelope parent_span_id.
TimestampNs = 7
Overrides envelope ts_ns.
DurationNs = 8
Drives span start/end derivation.
Forensic = 9
Opaque blob; never indexed; size-capped.
Implementations§
Source§impl FieldKind
impl FieldKind
Sourcepub const fn is_envelope_lifted(self) -> bool
pub const fn is_envelope_lifted(self) -> bool
True if a value of this kind is lifted from the typed payload to a dedicated envelope slot (per 10-data-model.md § 6).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldKind
impl<'de> Deserialize<'de> for FieldKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Enumeration for FieldKind
impl Enumeration for FieldKind
Source§fn from_i32(value: i32) -> Option<FieldKind>
fn from_i32(value: i32) -> Option<FieldKind>
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§impl Serialize for FieldKind
impl Serialize for FieldKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __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 FieldKind
impl Eq for FieldKind
impl StructuralPartialEq for FieldKind
Auto Trait Implementations§
impl Freeze for FieldKind
impl RefUnwindSafe for FieldKind
impl Send for FieldKind
impl Sync for FieldKind
impl Unpin for FieldKind
impl UnsafeUnpin for FieldKind
impl UnwindSafe for FieldKind
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> 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.