pub struct MessageProperties {
pub correlation_id: Option<String>,
pub reply_to: Option<String>,
pub delivery_mode: u8,
pub priority: Option<u8>,
}Expand description
Message properties (AMQP-like)
Fields§
§correlation_id: Option<String>Correlation ID for RPC-style calls
reply_to: Option<String>Reply-to queue for results
delivery_mode: u8Delivery mode (1 = non-persistent, 2 = persistent)
priority: Option<u8>Priority (0-9, higher = more priority)
Implementations§
Source§impl MessageProperties
impl MessageProperties
Sourcepub fn with_correlation_id(self, correlation_id: String) -> Self
pub fn with_correlation_id(self, correlation_id: String) -> Self
Set correlation ID (builder pattern)
Sourcepub fn with_reply_to(self, reply_to: String) -> Self
pub fn with_reply_to(self, reply_to: String) -> Self
Set reply-to queue (builder pattern)
Sourcepub fn with_delivery_mode(self, delivery_mode: u8) -> Self
pub fn with_delivery_mode(self, delivery_mode: u8) -> Self
Set delivery mode (builder pattern)
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Set priority (builder pattern)
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate message properties
Trait Implementations§
Source§impl Clone for MessageProperties
impl Clone for MessageProperties
Source§fn clone(&self) -> MessageProperties
fn clone(&self) -> MessageProperties
Returns a duplicate of the value. Read more
1.0.0 · 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 MessageProperties
impl Debug for MessageProperties
Source§impl Default for MessageProperties
impl Default for MessageProperties
Source§impl<'de> Deserialize<'de> for MessageProperties
impl<'de> Deserialize<'de> for MessageProperties
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 MessageProperties
impl PartialEq for MessageProperties
Source§impl Serialize for MessageProperties
impl Serialize for MessageProperties
impl Eq for MessageProperties
impl StructuralPartialEq for MessageProperties
Auto Trait Implementations§
impl Freeze for MessageProperties
impl RefUnwindSafe for MessageProperties
impl Send for MessageProperties
impl Sync for MessageProperties
impl Unpin for MessageProperties
impl UnwindSafe for MessageProperties
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