pub struct CreateMessageRequestBody {
pub receive_id: String,
pub msg_type: String,
pub content: String,
pub uuid: Option<String>,
}Expand description
发送消息 请求体
Fields§
§receive_id: String消息接收者的ID,ID类型应与查询参数receive_id_type 对应; 推荐使用 OpenID,获取方式可参考文档如何获取 Open ID?
示例值:“ou_7d8a6e6df7621556ce0d21922b676706ccs”
msg_type: String消息类型 包括:text、post、image、file、audio、media、sticker、interactive、share_chat、 share_user等,类型定义请参考发送消息内容
示例值:“text”
content: String消息内容,JSON结构序列化后的字符串。不同msg_type对应不同内容,具体格式说明参考: 发送消息内容
注意: JSON字符串需进行转义,如换行符转义后为\n 文本消息请求体最大不能超过150KB 卡片及富文本消息请求体最大不能超过30KB 示例值:“{"text":"test content"}”
uuid: Option<String>由开发者生成的唯一字符串序列,用于发送消息请求去重; 持有相同uuid的请求1小时内至多成功发送一条消息
示例值:“选填,每次调用前请更换,如a0d69e20-1dd1-458b-k525-dfeca4015204”
数据校验规则:
最大长度:50 字符
Implementations§
Trait Implementations§
Source§impl Clone for CreateMessageRequestBody
impl Clone for CreateMessageRequestBody
Source§fn clone(&self) -> CreateMessageRequestBody
fn clone(&self) -> CreateMessageRequestBody
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 CreateMessageRequestBody
impl Debug for CreateMessageRequestBody
Source§impl Default for CreateMessageRequestBody
impl Default for CreateMessageRequestBody
Source§fn default() -> CreateMessageRequestBody
fn default() -> CreateMessageRequestBody
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateMessageRequestBody
impl<'de> Deserialize<'de> for CreateMessageRequestBody
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 CreateMessageRequestBody
impl RefUnwindSafe for CreateMessageRequestBody
impl Send for CreateMessageRequestBody
impl Sync for CreateMessageRequestBody
impl Unpin for CreateMessageRequestBody
impl UnwindSafe for CreateMessageRequestBody
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