pub enum MessageBody {
Text {
content: String,
},
Image {
media_id: String,
},
Voice {
media_id: String,
duration: i32,
},
File {
media_id: String,
},
Link {
message_url: String,
pic_url: String,
title: String,
text: String,
},
Oa {
message_url: String,
pc_message_url: Option<String>,
head: OaHead,
status_bar: Option<OaStatusBar>,
body: OaBody,
},
Markdown {
title: String,
text: String,
},
ActionCard {
markdown: String,
title: Option<String>,
single_title: Option<String>,
single_url: Option<String>,
btn_orientation: Option<String>,
btn_json_list: Option<Vec<BtnJson>>,
},
}
Expand description
消息体
Variants§
Text
文本消息
Image
图片消息
Fields
Voice
语音消息
Fields
File
文件消息
Link
链接消息
Fields
Oa
OA消息
Fields
§
status_bar: Option<OaStatusBar>
消息状态栏,只支持接收者的userid列表,userid最多不能超过5个人。 说明 不支持部门id列表,并且to_all_user不能传true
Markdown
markdown消息
ActionCard
卡片消息
Trait Implementations§
Source§impl Debug for MessageBody
impl Debug for MessageBody
Source§impl Default for MessageBody
impl Default for MessageBody
Source§impl<'de> Deserialize<'de> for MessageBody
impl<'de> Deserialize<'de> for MessageBody
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
Source§impl From<MessageBody> for Message
impl From<MessageBody> for Message
Source§fn from(body: MessageBody) -> Self
fn from(body: MessageBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessageBody
impl RefUnwindSafe for MessageBody
impl Send for MessageBody
impl Sync for MessageBody
impl Unpin for MessageBody
impl UnwindSafe for MessageBody
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