pub struct MessageMetadata {
pub id: Option<MessageId>,
pub correlation_id: Option<String>,
pub reply_to: Option<QueueName>,
pub content_type: Option<String>,
pub timestamp: Option<u64>,
pub priority: Option<u8>,
pub expiration: Option<u64>,
pub headers: HashMap<String, String>,
}Expand description
消息元数据
Fields§
§id: Option<MessageId>消息 ID
correlation_id: Option<String>关联 ID (用于消息关联)
reply_to: Option<QueueName>回复队列
content_type: Option<String>内容类型
timestamp: Option<u64>时间戳
priority: Option<u8>优先级 (0-9)
expiration: Option<u64>过期时间 (毫秒)
headers: HashMap<String, String>自定义头信息
Trait Implementations§
Source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
Source§fn clone(&self) -> MessageMetadata
fn clone(&self) -> MessageMetadata
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 MessageMetadata
impl Debug for MessageMetadata
Source§impl Default for MessageMetadata
impl Default for MessageMetadata
Source§fn default() -> MessageMetadata
fn default() -> MessageMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MessageMetadata
impl RefUnwindSafe for MessageMetadata
impl Send for MessageMetadata
impl Sync for MessageMetadata
impl Unpin for MessageMetadata
impl UnsafeUnpin for MessageMetadata
impl UnwindSafe for MessageMetadata
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