#[non_exhaustive]pub enum FieldRole {
None,
Key,
SpanId,
ParentSpanId,
}Expand description
The semantic role a field plays beyond its raw type.
Roles are mutually exclusive — a field is at most one of these — so a single enum makes the
illegal combinations unrepresentable instead of forcing consumers to reconcile parallel
booleans. Key is the original #[event(key)] promotion; the two span roles
let the trace converter pair begin/end records and build parent/child links purely from the
schema.
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.
None
An ordinary field with no special role.
Key
A high-value join/index column the reader promotes to the top level (#[event(key)]).
SpanId
The span’s own id (#[event(span_id)]): a u64 the converter pairs enter/exit records by.
ParentSpanId
The id of the enclosing span (#[event(parent_span_id)]): a u64 linking this record to
its parent, for nesting in the trace view.
Trait Implementations§
impl Copy for FieldRole
impl Eq for FieldRole
impl StructuralPartialEq for FieldRole
Auto Trait Implementations§
impl Freeze for FieldRole
impl RefUnwindSafe for FieldRole
impl Send for FieldRole
impl Sync for FieldRole
impl Unpin for FieldRole
impl UnsafeUnpin for FieldRole
impl UnwindSafe for FieldRole
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