pub struct EventEnvelopeMetadata { /* private fields */ }Expand description
Type-erased event metadata exposed to global interceptors.
Implementations§
Source§impl EventEnvelopeMetadata
impl EventEnvelopeMetadata
Sourcepub fn topic_name(&self) -> &str
pub fn topic_name(&self) -> &str
Sourcepub fn payload_type_name(&self) -> &'static str
pub fn payload_type_name(&self) -> &'static str
Sourcepub fn ordering_key(&self) -> Option<&str>
pub fn ordering_key(&self) -> Option<&str>
Sourcepub fn timestamp(&self) -> SystemTime
pub fn timestamp(&self) -> SystemTime
Sourcepub fn is_dead_letter(&self) -> bool
pub fn is_dead_letter(&self) -> bool
Returns whether this metadata represents a dead letter.
§Returns
true if the source envelope is already a dead letter.
Sourcepub fn with_header(self, key: &str, value: impl ToString) -> Self
pub fn with_header(self, key: &str, value: impl ToString) -> Self
Sourcepub fn without_header(self, key: &str) -> Self
pub fn without_header(self, key: &str) -> Self
Sourcepub fn with_ordering_key(self, ordering_key: &str) -> Self
pub fn with_ordering_key(self, ordering_key: &str) -> Self
Sourcepub fn without_ordering_key(self) -> Self
pub fn without_ordering_key(self) -> Self
Sourcepub fn with_delay(self, delay: Duration) -> Self
pub fn with_delay(self, delay: Duration) -> Self
Sourcepub fn without_delay(self) -> Self
pub fn without_delay(self) -> Self
Trait Implementations§
Source§impl Clone for EventEnvelopeMetadata
impl Clone for EventEnvelopeMetadata
Source§fn clone(&self) -> EventEnvelopeMetadata
fn clone(&self) -> EventEnvelopeMetadata
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 EventEnvelopeMetadata
impl Debug for EventEnvelopeMetadata
Source§impl IntoPublisherInterceptorAnyResult for EventEnvelopeMetadata
impl IntoPublisherInterceptorAnyResult for EventEnvelopeMetadata
Source§fn into_publisher_interceptor_any_result(
self,
) -> EventBusResult<Option<EventEnvelopeMetadata>>
fn into_publisher_interceptor_any_result( self, ) -> EventBusResult<Option<EventEnvelopeMetadata>>
Converts the value into a global publisher interceptor result. Read more
Auto Trait Implementations§
impl Freeze for EventEnvelopeMetadata
impl RefUnwindSafe for EventEnvelopeMetadata
impl Send for EventEnvelopeMetadata
impl Sync for EventEnvelopeMetadata
impl Unpin for EventEnvelopeMetadata
impl UnsafeUnpin for EventEnvelopeMetadata
impl UnwindSafe for EventEnvelopeMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.