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<MessageRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MessageRecord
impl Serialize for MessageRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more