pub struct MessageRecord {
pub id: Uuid,
pub from: Vec<u8>,
pub payload: Vec<u8>,
pub priority: MessagePriority,
pub created_at: DateTime<Utc>,
pub status: MessageStatus,
}Expand description
从队列中取出的消息记录
Fields§
§id: Uuid消息 ID
from: Vec<u8>消息发送方的 ActrId (Protobuf bytes)
§设计说明
- from 存储原始 Protobuf bytes,不反序列化为 ActrId 结构
- 避免 decode → ActrId → encode 的循环
- 只在真正需要使用时才反序列化一次
- Gateway 直接传递 bytes,零开销
- 所有进入 Mailbox 的消息都来自 WebRTC,必然有 sender
payload: Vec<u8>消息内容(raw bytes,不解包)
priority: MessagePriority优先级
created_at: DateTime<Utc>创建时间
status: MessageStatus处理状态
Trait Implementations§
Source§impl Clone for MessageRecord
impl Clone for MessageRecord
Source§fn clone(&self) -> MessageRecord
fn clone(&self) -> MessageRecord
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 MessageRecord
impl Debug for MessageRecord
Source§impl<'de> Deserialize<'de> for MessageRecord
impl<'de> Deserialize<'de> for MessageRecord
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
Auto Trait Implementations§
impl Freeze for MessageRecord
impl RefUnwindSafe for MessageRecord
impl Send for MessageRecord
impl Sync for MessageRecord
impl Unpin for MessageRecord
impl UnwindSafe for MessageRecord
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