[][src]Enum wechat_mp::ReplyMessage

pub enum ReplyMessage {
    Text {
        info: MessageInfo,
        content: String,
    },
    Image {
        info: MessageInfo,
        media_id: String,
    },
    Voice {
        info: MessageInfo,
        media_id: String,
    },
    Video {
        info: MessageInfo,
        media_id: String,
        title: Option<String>,
        description: Option<String>,
    },
    Music {
        info: MessageInfo,
        thumb_media_id: String,
        title: Option<String>,
        description: Option<String>,
        music_url: Option<String>,
        hq_music_url: Option<String>,
    },
    News {
        info: MessageInfo,
        articles: Vec<ReplyArticle>,
    },
}

被动回复用户消息

Variants

Text

回复文本消息

Fields of Text

info: MessageInfocontent: String

回复的消息内容(换行:在content中能够换行,微信客户端就支持换行显示)

Image

回复图片消息

Fields of Image

info: MessageInfomedia_id: String

通过素材管理中的接口上传多媒体文件,得到的id。

Voice

回复语音消息

Fields of Voice

info: MessageInfomedia_id: String

通过素材管理中的接口上传多媒体文件,得到的id

Video

回复视频消息

Fields of Video

info: MessageInfomedia_id: String

通过素材管理中的接口上传多媒体文件,得到的id

title: Option<String>

视频消息的标题

description: Option<String>

视频消息的描述

Music

回复音乐消息

Fields of Music

info: MessageInfothumb_media_id: String

缩略图的媒体id,通过素材管理中的接口上传多媒体文件,得到的id

title: Option<String>

音乐标题

description: Option<String>

音乐描述

music_url: Option<String>

音乐链接

hq_music_url: Option<String>

高质量音乐链接,WIFI环境优先使用该链接播放音乐

News

Fields of News

info: MessageInfoarticles: Vec<ReplyArticle>

Implementations

impl ReplyMessage[src]

pub fn set_reply_info(&mut self, from_user_name: &String, to_user_name: &String)[src]

pub fn get_info(&self) -> &MessageInfo[src]

pub fn text<S: Into<String>>(content: S) -> Self[src]

pub fn image<S: Into<String>>(media_id: String) -> Self[src]

pub fn voice<S: Into<String>>(media_id: S) -> Self[src]

pub fn video<S: Into<String>>(
    media_id: S,
    title: Option<String>,
    description: Option<String>
) -> Self
[src]

pub fn music<S: Into<String>>(
    thumb_media_id: S,
    title: Option<String>,
    description: Option<String>,
    music_url: Option<String>,
    hq_music_url: Option<String>
) -> Self
[src]

pub fn news(articles: Vec<ReplyArticle>) -> Self[src]

Trait Implementations

impl Clone for ReplyMessage[src]

impl Debug for ReplyMessage[src]

impl<'_> From<&'_ str> for ReplyMessage[src]

impl From<String> for ReplyMessage[src]

impl PartialEq<ReplyMessage> for ReplyMessage[src]

impl StructuralPartialEq for ReplyMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> From<T> for T[src]

impl<T> Interface for T where
    T: Send + Sync + Any
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ModuleInterface for T where
    T: Send + Sync + Any
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,