pub struct MessageMeta {
pub traceparent: Option<String>,
pub tracestate: Option<String>,
pub baggage: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
Transport-level envelope for cross-cutting context that travels alongside (not inside) a message’s business payload.
Modelled on HTTP headers: transport concerns only. Do NOT put business data, secrets, or domain identifiers here.
Reserved keys in v1 are the W3C Trace Context headers
(traceparent, tracestate, baggage); wire-compatible with every
OpenTelemetry SDK. All other keys land in extra via
#[serde(flatten)] and round-trip untouched.
Fields§
§traceparent: Option<String>§tracestate: Option<String>§baggage: Option<String>§extra: BTreeMap<String, Value>Free-form extension fields. Applications using this library serialize their own keys here and are responsible for their own typing.
Trait Implementations§
Source§impl Clone for MessageMeta
impl Clone for MessageMeta
Source§fn clone(&self) -> MessageMeta
fn clone(&self) -> MessageMeta
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 MessageMeta
impl Debug for MessageMeta
Source§impl Default for MessageMeta
impl Default for MessageMeta
Source§fn default() -> MessageMeta
fn default() -> MessageMeta
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageMetawhere
MessageMeta: Default,
impl<'de> Deserialize<'de> for MessageMetawhere
MessageMeta: Default,
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 PartialEq for MessageMeta
impl PartialEq for MessageMeta
Source§fn eq(&self, other: &MessageMeta) -> bool
fn eq(&self, other: &MessageMeta) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MessageMeta
impl Serialize for MessageMeta
impl StructuralPartialEq for MessageMeta
Auto Trait Implementations§
impl Freeze for MessageMeta
impl RefUnwindSafe for MessageMeta
impl Send for MessageMeta
impl Sync for MessageMeta
impl Unpin for MessageMeta
impl UnsafeUnpin for MessageMeta
impl UnwindSafe for MessageMeta
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