Enum miraie::messages::MessageBlock [−][src]
pub enum MessageBlock { Source { id: i64, time: DateTime<Utc>, }, Quote { id: i64, group_id: QQ, sender_id: QQ, target_id: QQ, origin: MessageChain, }, At { target: QQ, display: String, }, AtAll, Face { face_id: i32, name: String, }, Text { text: String, }, Image { image_id: String, url: String, base64: Option<String>, }, FlushImage { image_id: String, url: String, base64: Option<String>, }, Voice { voice_id: Option<String>, url: Option<String>, base64: Option<String>, }, Xml { xml: String, }, File { id: String, name: String, size: usize, }, }
Expand description
Variants
Source类型永远为chain的第一个元素
引用回复
Show fields
Fields of Quote
id: i64
原消息的messageId
group_id: QQ
原消息所接收的群号,当为好友消息时为0
sender_id: QQ
原消息的发送者的QQ号
target_id: QQ
原消息的接收者者的QQ号(或群号)
origin: MessageChain
原消息的消息链对象
@ 人
@全体成员
QQ表情
文字消息
Show fields
Fields of Text
text: String
图片消息
三个参数任选其一,出现多个参数时,按照imageId > url > path > base64的优先级
Show fields
闪照
三个参数任选其一,出现多个参数时,按照imageId > url > path > base64的优先级
Show fields
音频消息
三个参数任选其一,出现多个参数时,按照voiceId > url > path > base64的优先级
Show fields
XML
Show fields
Fields of Xml
xml: String
文件消息
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MessageBlock
impl Send for MessageBlock
impl Sync for MessageBlock
impl Unpin for MessageBlock
impl UnwindSafe for MessageBlock
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V