#[non_exhaustive]pub struct CorrelationMetadata {
pub correlation_id: Option<CorrelationId>,
pub conversation_id: ConversationId,
pub causation_id: Option<MessageId>,
pub request_id: Option<RequestId>,
}Expand description
Correlation and conversation identity for one envelope.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.correlation_id: Option<CorrelationId>Application/business workflow correlation, set by the caller.
conversation_id: ConversationIdGroups every message in one business conversation.
causation_id: Option<MessageId>The message that directly caused this one.
request_id: Option<RequestId>The inbound request that (transitively) caused this one.
Trait Implementations§
Source§impl Clone for CorrelationMetadata
impl Clone for CorrelationMetadata
Source§fn clone(&self) -> CorrelationMetadata
fn clone(&self) -> CorrelationMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CorrelationMetadata
impl Debug for CorrelationMetadata
Source§impl Default for CorrelationMetadata
Sets conversation_id to the ConversationId::UNSET sentinel (the nil UUID) — not a
fresh mint — so crate::EnvelopeBuilder::build can tell “not yet rooted” from a genuinely
chosen value by comparing it, not by tracking which builder setter was called.
build replaces UNSET with the envelope’s own id, so an un-correlated message is the root
of its own conversation, and leaves any other value alone. A Metadata that never passes
through the builder (e.g. read straight off Default) keeps the placeholder verbatim.
impl Default for CorrelationMetadata
Sets conversation_id to the ConversationId::UNSET sentinel (the nil UUID) — not a
fresh mint — so crate::EnvelopeBuilder::build can tell “not yet rooted” from a genuinely
chosen value by comparing it, not by tracking which builder setter was called.
build replaces UNSET with the envelope’s own id, so an un-correlated message is the root
of its own conversation, and leaves any other value alone. A Metadata that never passes
through the builder (e.g. read straight off Default) keeps the placeholder verbatim.