pub struct MessagePayloadEnvelope {
pub content: String,
pub metadata: Option<Value>,
pub reply_to_message_id: Option<String>,
pub mentioned_user_ids: Option<Vec<u64>>,
pub message_source: Option<MessageSource>,
}Expand description
Payload 解析后的顶层结构(content + metadata + 公共扩展)
Fields§
§content: String消息显示内容
metadata: Option<Value>类型相关元数据,按 ContentMessageType 解析为对应 *Metadata 结构体
reply_to_message_id: Option<String>引用消息 ID(可选)
mentioned_user_ids: Option<Vec<u64>>@ 提及的用户 ID 列表(可选)
message_source: Option<MessageSource>非好友消息来源(可选)
Trait Implementations§
Source§impl Clone for MessagePayloadEnvelope
impl Clone for MessagePayloadEnvelope
Source§fn clone(&self) -> MessagePayloadEnvelope
fn clone(&self) -> MessagePayloadEnvelope
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 MessagePayloadEnvelope
impl Debug for MessagePayloadEnvelope
Source§impl Default for MessagePayloadEnvelope
impl Default for MessagePayloadEnvelope
Source§fn default() -> MessagePayloadEnvelope
fn default() -> MessagePayloadEnvelope
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessagePayloadEnvelope
impl<'de> Deserialize<'de> for MessagePayloadEnvelope
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 MessagePayloadEnvelope
impl RefUnwindSafe for MessagePayloadEnvelope
impl Send for MessagePayloadEnvelope
impl Sync for MessagePayloadEnvelope
impl Unpin for MessagePayloadEnvelope
impl UnsafeUnpin for MessagePayloadEnvelope
impl UnwindSafe for MessagePayloadEnvelope
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