Struct Propagation Context
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub struct PropagationContext {
pub version: u16,
pub root_uuid: Option<Uuid>,
pub parent_uuid: Uuid,
}
Versioned, transport-neutral causal context for crossing a Relay boundary.
Applications are responsible for serializing, transporting, authenticating, and trusting this value. It intentionally contains only Relay identifiers; OpenTelemetry traceparent and tracestate remain transport sidecars. A context without a root_uuid preserves Relay event parentage when imported. The first local OpenTelemetry span created after import starts a new trace.
Fields
version: u16
Wire-format version. Version 1 is the only currently supported value.
root_uuid: Option<Uuid>
Stable session root when the sending application knows one. When this root is omitted, the first local OpenTelemetry span after import starts a new trace.
parent_uuid: Uuid
Immediate Relay event or scope that caused the boundary crossing.
Implementations
impl PropagationContext
impl PropagationContext
VERSION
pub const VERSION: u16 = 1
The current wire-format version.
to_json
pub fn to_json(&self) -> Result<String>
Serialize this validated context for application-managed transport.
from_json
pub fn from_json(value: &str) -> Result<Self>
Deserialize and validate a context received from application-managed transport.
validate
pub fn validate(&self) -> Result<()>
Validate a context received from an untrusted transport.
Trait Implementations
impl Clone for PropagationContext
impl Clone for PropagationContext
clone
fn clone(&self) -> PropagationContext
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for PropagationContext
impl Debug for PropagationContext
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for PropagationContext
impl<'de> Deserialize<'de> for PropagationContext
deserialize
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for PropagationContext
impl PartialEq for PropagationContext
eq
fn eq(&self, other: &PropagationContext) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl Serialize for PropagationContext
impl Serialize for PropagationContext
serialize
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl Eq for PropagationContext
impl Eq for PropagationContext
impl StructuralPartialEq for PropagationContext
impl StructuralPartialEq for PropagationContext