pub struct MenuModule<'a, T: WxApiRequestBuilder>(/* private fields */);
Expand description
菜单模块
Implementations§
Source§impl<'a, T: WxApiRequestBuilder> MenuModule<'a, T>
impl<'a, T: WxApiRequestBuilder> MenuModule<'a, T>
Sourcepub async fn create_by_json<U: Serialize + ?Sized>(
&self,
menu_json: &U,
) -> SdkResult<()>
pub async fn create_by_json<U: Serialize + ?Sized>( &self, menu_json: &U, ) -> SdkResult<()>
创建自定义菜单(通过自定义的json数据)
获取当前菜单信息
Sourcepub async fn addconditional(
&self,
rules: MatchRule,
menu_json: Vec<MenuButton>,
) -> SdkResult<MenuId>
pub async fn addconditional( &self, rules: MatchRule, menu_json: Vec<MenuButton>, ) -> SdkResult<MenuId>
添加个性化菜单
Sourcepub async fn delconditional(&self, menuid: MenuId) -> SdkResult<()>
pub async fn delconditional(&self, menuid: MenuId) -> SdkResult<()>
删除个性化菜单
Sourcepub async fn trymatch(&self, user_id: String) -> SdkResult<MatchButtons>
pub async fn trymatch(&self, user_id: String) -> SdkResult<MatchButtons>
测试个性化菜单匹配结果 user_id可以是粉丝的OpenID,也可以是粉丝的微信号。
Sourcepub async fn get(&self) -> SdkResult<AllButtons>
pub async fn get(&self) -> SdkResult<AllButtons>
获取自定义菜单配置 在设置了个性化菜单后,使用本自定义菜单查询接口可以获取默认菜单和全部个性化菜单信息
Auto Trait Implementations§
impl<'a, T> Freeze for MenuModule<'a, T>
impl<'a, T> RefUnwindSafe for MenuModule<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MenuModule<'a, T>where
T: Sync,
impl<'a, T> Sync for MenuModule<'a, T>where
T: Sync,
impl<'a, T> Unpin for MenuModule<'a, T>
impl<'a, T> UnwindSafe for MenuModule<'a, T>where
T: RefUnwindSafe,
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