pub struct MessageProperties { /* private fields */ }Expand description
Type-safe message properties.
Implementations§
Source§impl MessageProperties
impl MessageProperties
Sourcepub fn get(&self, key: MessagePropertyKey) -> Option<&str>
pub fn get(&self, key: MessagePropertyKey) -> Option<&str>
Gets a property value by key.
Sourcepub fn as_map(&self) -> &HashMap<CheetahString, CheetahString>
pub fn as_map(&self) -> &HashMap<CheetahString, CheetahString>
Returns all properties as a map (for serialization and external crates).
Sourcepub fn from_map(map: HashMap<CheetahString, CheetahString>) -> Self
pub fn from_map(map: HashMap<CheetahString, CheetahString>) -> Self
Creates MessageProperties from a HashMap.
Returns the tags, if any.
Sourcepub fn delay_level(&self) -> Option<i32>
pub fn delay_level(&self) -> Option<i32>
Returns the delay time level.
Sourcepub fn delay_time_sec(&self) -> Option<u64>
pub fn delay_time_sec(&self) -> Option<u64>
Returns the delay time in seconds.
Sourcepub fn delay_time_ms(&self) -> Option<u64>
pub fn delay_time_ms(&self) -> Option<u64>
Returns the delay time in milliseconds.
Sourcepub fn deliver_time_ms(&self) -> Option<u64>
pub fn deliver_time_ms(&self) -> Option<u64>
Returns the delivery time in milliseconds.
Sourcepub fn wait_store_msg_ok(&self) -> bool
pub fn wait_store_msg_ok(&self) -> bool
Returns whether to wait for store confirmation.
Sourcepub fn origin_message_id(&self) -> Option<&str>
pub fn origin_message_id(&self) -> Option<&str>
Returns the origin message ID.
Sourcepub fn retry_topic(&self) -> Option<&str>
pub fn retry_topic(&self) -> Option<&str>
Returns the retry topic.
Sourcepub fn real_topic(&self) -> Option<&str>
pub fn real_topic(&self) -> Option<&str>
Returns the real topic.
Sourcepub fn real_queue_id(&self) -> Option<i32>
pub fn real_queue_id(&self) -> Option<i32>
Returns the real queue ID.
Sourcepub fn unique_client_msg_id(&self) -> Option<&str>
pub fn unique_client_msg_id(&self) -> Option<&str>
Returns the unique client message ID.
Sourcepub fn producer_group(&self) -> Option<&str>
pub fn producer_group(&self) -> Option<&str>
Returns the producer group.
Sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
Returns the instance ID.
Sourcepub fn correlation_id(&self) -> Option<&str>
pub fn correlation_id(&self) -> Option<&str>
Returns the correlation ID.
Sourcepub fn message_type(&self) -> Option<&str>
pub fn message_type(&self) -> Option<&str>
Returns the message type.
Sourcepub fn trace_switch(&self) -> bool
pub fn trace_switch(&self) -> bool
Returns the trace switch.
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§fn default() -> MessageProperties
fn default() -> MessageProperties
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MessageProperties
impl RefUnwindSafe for MessageProperties
impl Send for MessageProperties
impl Sync for MessageProperties
impl Unpin for MessageProperties
impl UnsafeUnpin 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