[][src]Enum wechat_mp::CallbackMessage

pub enum CallbackMessage {
    Text {
        info: MessageInfo,
        content: String,
        biz_msg_menu_id: Option<String>,
    },
    Image {
        info: MessageInfo,
        pic_url: String,
        media_id: String,
    },
    Voice {
        info: MessageInfo,
        media_id: String,
        format: String,
        recognition: Option<String>,
    },
    Video {
        info: MessageInfo,
        media_id: String,
        thumb_media_id: String,
    },
    ShortVideo {
        info: MessageInfo,
        media_id: String,
        thumb_media_id: String,
    },
    Location {
        info: MessageInfo,
        x: f64,
        y: f64,
        scale: u64,
        label: String,
    },
    Link {
        info: MessageInfo,
        title: String,
        description: String,
        url: String,
    },
    Event {
        info: MessageInfo,
        event: NormalEventMessage,
    },
    MenuMessage {
        info: MessageInfo,
        event: MenuEventMessage,
    },
}

微信回调消息

Variants

Text

文本消息

Fields of Text

info: MessageInfocontent: String

文本消息内容

biz_msg_menu_id: Option<String>

菜单消息

Image

图片消息

Fields of Image

info: MessageInfopic_url: String

图片链接(由系统生成)

media_id: String

图片消息媒体id,可以调用获取临时素材接口拉取数据。

Voice

语音消息

Fields of Voice

info: MessageInfomedia_id: String

语音消息媒体id,可以调用获取临时素材接口拉取数据

format: String

语音格式,如amr,speex等

recognition: Option<String>

语音识别结果,UTF8编码

Video

视频消息

Fields of Video

info: MessageInfomedia_id: String

视频消息媒体id,可以调用获取临时素材接口拉取数据

thumb_media_id: String

视频消息缩略图的媒体id,可以调用多媒体文件下载接口拉取数据

ShortVideo

小视频消息

Fields of ShortVideo

info: MessageInfomedia_id: String

视频消息媒体id,可以调用获取临时素材接口拉取数据。

thumb_media_id: String

视频消息缩略图的媒体id,可以调用获取临时素材接口拉取数据

Location

地理位置消息

Fields of Location

info: MessageInfox: f64

地理位置纬度

y: f64

地理位置经度

scale: u64

地图缩放大小

label: String

地理位置信息

链接消息

Fields of Link

info: MessageInfotitle: String

消息标题

description: String

消息描述

url: String

消息链接

Event

普通回调事件

Fields of Event

info: MessageInfoevent: NormalEventMessage
MenuMessage

菜单事件

Fields of MenuMessage

info: MessageInfoevent: MenuEventMessage

Implementations

impl CallbackMessage[src]

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

Trait Implementations

impl Clone for CallbackMessage[src]

impl Debug for CallbackMessage[src]

impl PartialEq<CallbackMessage> for CallbackMessage[src]

impl StructuralPartialEq for CallbackMessage[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>,