pub struct EnvelopeMetadata { /* private fields */ }Expand description
Metadata carried with a message without imposing broker semantics.
Implementations§
Source§impl EnvelopeMetadata
impl EnvelopeMetadata
Sourcepub fn correlation_id(self, correlation_id: impl Into<String>) -> Result<Self>
pub fn correlation_id(self, correlation_id: impl Into<String>) -> Result<Self>
Sets a bounded correlation identifier.
Sourcepub fn causation_id(self, causation_id: impl Into<String>) -> Result<Self>
pub fn causation_id(self, causation_id: impl Into<String>) -> Result<Self>
Sets a bounded causation identifier.
Sourcepub fn traceparent(self, traceparent: impl Into<String>) -> Result<Self>
pub fn traceparent(self, traceparent: impl Into<String>) -> Result<Self>
Sets validated W3C trace context for downstream propagation.
Sourcepub fn header(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Result<Self>
pub fn header( self, name: impl Into<String>, value: impl Into<String>, ) -> Result<Self>
Adds a bounded transport-neutral header.
Header values remain available to application code but are never shown
by this type’s Debug implementation.
Sourcepub fn correlation_id_value(&self) -> Option<&str>
pub fn correlation_id_value(&self) -> Option<&str>
Returns the correlation identifier, when present.
Sourcepub fn causation_id_value(&self) -> Option<&str>
pub fn causation_id_value(&self) -> Option<&str>
Returns the causation identifier, when present.
Sourcepub fn traceparent_value(&self) -> Option<&str>
pub fn traceparent_value(&self) -> Option<&str>
Returns the propagated W3C traceparent, when present.
Trait Implementations§
Source§impl Clone for EnvelopeMetadata
impl Clone for EnvelopeMetadata
Source§fn clone(&self) -> EnvelopeMetadata
fn clone(&self) -> EnvelopeMetadata
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 EnvelopeMetadata
impl Debug for EnvelopeMetadata
Source§impl Default for EnvelopeMetadata
impl Default for EnvelopeMetadata
Source§fn default() -> EnvelopeMetadata
fn default() -> EnvelopeMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnvelopeMetadata
impl<'de> Deserialize<'de> for EnvelopeMetadata
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
impl Eq for EnvelopeMetadata
Source§impl PartialEq for EnvelopeMetadata
impl PartialEq for EnvelopeMetadata
Source§impl Serialize for EnvelopeMetadata
impl Serialize for EnvelopeMetadata
impl StructuralPartialEq for EnvelopeMetadata
Auto Trait Implementations§
impl Freeze for EnvelopeMetadata
impl RefUnwindSafe for EnvelopeMetadata
impl Send for EnvelopeMetadata
impl Sync for EnvelopeMetadata
impl Unpin for EnvelopeMetadata
impl UnsafeUnpin for EnvelopeMetadata
impl UnwindSafe for EnvelopeMetadata
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