Skip to main content

WxOpenComponentServiceImpl

Struct WxOpenComponentServiceImpl 

Source
pub struct WxOpenComponentServiceImpl { /* private fields */ }
Expand description

组件服务实现。

Implementations§

Source§

impl WxOpenComponentServiceImpl

Source

pub fn new(wx_open_service: Weak<dyn WxOpenService>) -> Self

构建组件服务(对应 Java new WxOpenComponentServiceImpl(this))。

§参数
  • wx_open_service:门面服务弱引用(Rust 以弱引用打破循环引用)

Trait Implementations§

Source§

impl WxOpenComponentService for WxOpenComponentServiceImpl

Source§

fn get_wx_mp_service_by_appid( &self, app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的开放平台公众号服务(对应 Java getWxMpServiceByAppid(String appid),双检锁缓存按 appid 装配 WxOpenMpServiceImpl)。

镜像 Java:先无锁读缓存,未命中再持锁二次检查后装配 WxOpenMpService(构造时快照门面配置存储与 HTTP 客户端)。 返回值以 Arc<dyn Any + Send + Sync> 承载(trait 签名冻结), 调用方经 [crate::api::r#impl::downcast_mp_service] 下转为 Arc<dyn WxMpService>

Source§

fn get_wx_ma_service_by_appid( &self, app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的开放平台小程序服务(对应 Java getWxMaServiceByAppid(String appid),双检锁缓存装配 WxOpenMaServiceImpl)。

返回值经 [crate::api::r#impl::downcast_ma_service] 下转为 Arc<dyn WxMaService>

Source§

fn get_wx_fast_ma_service_by_appid( &self, app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的快速创建的小程序服务(对应 Java getWxFastMaServiceByAppid(String appid))。

Java @Deprecated(2021-06-23:请使用 WxOpenMaService)。 Java 以独立类 WxOpenFastMaServiceImpl(extends WxMaServiceImpl, getAccessToken 同委托 authorizer token)装配;Rust 语义等价, 统一以 WxOpenMaService 承载(独立缓存桶镜像 Java 独立 map, ADAPTED),返回值经 [crate::api::r#impl::downcast_ma_service] 下转为 Arc<dyn WxMaService>

Source§

fn get_wx_minishop_service_by_appid( &self, app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的小商店服务(对应 Java getWxMinishopServiceByAppid(String appid),双检锁缓存装配 WxOpenMinishopServiceImpl)。

Wave 5 接线(此前恒 None):镜像 Java 静态 WX_OPEN_MINISHOP_SERVICE_MAP + synchronized 双检锁;Rust 以 实例级 Mutex<HashMap> 表达,装配 WxOpenMinishopServiceImpl (构造入参 appId + 门面弱引用,Java 传 this 组件服务 + appId + wxMaConfig,语义一致,ADAPTED)。返回值以 Arc<dyn Any + Send + Sync> 承载,调用方按具体类型 WxOpenMinishopServiceImpl downcast 下转。

Source§

fn wx_open_service(&self) -> Option<Arc<dyn WxOpenService>>

持有的门面服务(对应 Java getWxOpenService())。 Read more
Source§

fn start_push_ticket<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

启动 verify ticket 推送服务(对应 Java startPushTicket())。
Source§

fn get_component_access_token<'life0, 'async_trait>( &'life0 self, force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取 component_access_token(对应 Java getComponentAccessToken(boolean forceRefresh),开放平台接口调用凭据)。 Read more
Source§

fn post<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uri: &'life1 str, post_data: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

POST 请求(对应 Java post(String, String),默认注入键 component_access_token)。
Source§

fn post_with_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uri: &'life1 str, post_data: &'life2 str, access_token_key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

POST 请求(对应 Java post(String, String, String accessTokenKey), 自定义 token 注入键)。
Source§

fn post_with_token<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, uri: &'life1 str, post_data: &'life2 str, access_token_key: &'life3 str, access_token: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

POST 请求(对应 Java post(String, String, String accessTokenKey, String accessToken),调用方显式传 token,不做自动刷新)。
Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

GET 请求(对应 Java get(String uri),默认注入键 component_access_token)。
Source§

fn get_with_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uri: &'life1 str, access_token_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

GET 请求(对应 Java get(String uri, String accessTokenKey))。
Source§

fn get_pre_auth_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取预授权码(对应 Java WxOpenComponentServiceImpl.createPreAuthUrl 内部 POST API_CREATE_PREAUTHCODE_URLpre_auth_code 字段)。
Source§

fn get_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取网页授权预授权链接(对应 Java getPreAuthUrl(String redirectUri))。
Source§

fn get_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, redirect_uri: &'life1 str, auth_type: Option<&'life2 str>, biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取网页授权预授权链接(对应 Java getPreAuthUrl(String redirectUri, String authType, String bizAppid))。
Source§

fn get_mobile_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取移动端预授权链接(对应 Java getMobilePreAuthUrl(String redirectUri))。
Source§

fn get_mobile_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, redirect_uri: &'life1 str, auth_type: Option<&'life2 str>, biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取移动端预授权链接(对应 Java getMobilePreAuthUrl(String redirectUri, String authType, String bizAppid))。
Source§

fn route<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 WxOpenXmlMessage, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

路由第三方平台推送的加密回调消息(对应 Java route(WxOpenXmlMessage wxMessage),POST 回调消息解密 + 分发)。 Read more
Source§

fn get_query_auth<'life0, 'life1, 'async_trait>( &'life0 self, authorization_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenQueryAuthResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

使用授权码换取公众号或小程序的接口调用凭据和授权信息(对应 Java getQueryAuth(String authorizationCode))。 Read more
Source§

fn get_authorizer_info<'life0, 'life1, 'async_trait>( &'life0 self, authorizer_appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerInfoResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取授权方的帐号基本信息(对应 Java getAuthorizerInfo(String authorizerAppid))。
Source§

fn get_authorizer_list<'life0, 'async_trait>( &'life0 self, begin: i32, len: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerListResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取所有授权方列表(对应 Java getAuthorizerList(int begin, int len))。 Read more
Source§

fn get_authorizer_option<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, authorizer_appid: &'life1 str, option_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerOptionResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

获取授权方的选项设置信息(对应 Java getAuthorizerOption(String authorizerAppid, String optionName), 以授权方 access_token 为 key 调用)。
Source§

fn set_authorizer_option<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, authorizer_appid: &'life1 str, option_name: &'life2 str, option_value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

设置授权方的选项信息(对应 Java setAuthorizerOption(String authorizerAppid, String optionName, String optionValue))。
Source§

fn get_authorizer_access_token<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取(刷新)授权方 access_token(对应 Java getAuthorizerAccessToken(String appid, boolean forceRefresh), 三方 token 刷新链:refresh_token 换新 token)。
Source§

fn oauth2_get_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

用 code 换取 oauth2 的 access token(对应 Java oauth2getAccessToken (String appid, String code))。 Read more
Source§

fn oauth2_refresh_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, refresh_token: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

刷新 oauth2 的 access token(对应 Java oauth2refreshAccessToken(String appid, String refreshToken))。
Source§

fn miniapp_jscode2_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, js_code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Value, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小程序登录 code 换 session(对应 Java miniappJscode2Session(String appId, String jsCode))。 Read more
Source§

fn get_template_draft_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取草稿箱内的所有临时代码草稿(对应 Java getTemplateDraftList())。 Read more
Source§

fn get_template_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取代码模版库中的所有小程序代码模版(对应 Java getTemplateList(), Java @Deprecated,请使用 Self::get_template_list_with_type)。
Source§

fn get_template_list_with_type<'life0, 'async_trait>( &'life0 self, template_type: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取代码模版库中的所有小程序代码模版(对应 Java getTemplateList(Integer templateType)template_type 可空, 默认全部,0 普通模板,1 标准模板)。
Source§

fn add_to_template<'life0, 'async_trait>( &'life0 self, draft_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

将草稿箱的草稿选为小程序代码模版(对应 Java addToTemplate(long draftId),Java @Deprecated,请使用 Self::add_to_template_with_type)。
Source§

fn add_to_template_with_type<'life0, 'async_trait>( &'life0 self, draft_id: i64, template_type: i32, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

将草稿添加到代码模板库(对应 Java addToTemplate(long draftId, int templateType)template_type:普通模板 0,标准模板 1)。
Source§

fn delete_template<'life0, 'async_trait>( &'life0 self, template_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

删除指定小程序代码模版(对应 Java deleteTemplate(long templateId))。
Source§

fn create_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenCreateResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

创建开放平台帐号并绑定公众号/小程序(对应 Java createOpenAccount(String appId, String appIdType)app_id_type:mp-公众号 / mini-小程序)。 Read more
Source§

fn bind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, app_id: &'life1 str, app_id_type: &'life2 str, open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

将公众号/小程序绑定到开放平台帐号下(对应 Java bindOpenAccount(String appId, String appIdType, String openAppid))。 Read more
Source§

fn unbind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, app_id: &'life1 str, app_id_type: &'life2 str, open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

将公众号/小程序从开放平台帐号下解绑(对应 Java unbindOpenAccount(String appId, String appIdType, String openAppid))。 Read more
Source§

fn get_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenGetResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

获取公众号/小程序所绑定的开放平台帐号(对应 Java getOpenAccount(String appId, String appIdType))。 Read more
Source§

fn have_open<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenHaveResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

查询公众号/小程序是否绑定 open 帐号(对应 Java haveOpen(), 走 component_access_token,注入键 “access_token”)。
Source§

fn fast_register_weapp<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, name: &'life1 str, code: &'life2 str, code_type: &'life3 str, legal_persona_wechat: &'life4 str, legal_persona_name: &'life5 str, component_phone: &'life6 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

第三方平台快速创建小程序(对应 Java fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone))。
查询第三方平台快速创建小程序的任务状态(对应 Java fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName))。
Source§

fn fast_register_personal_weapp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, idname: &'life1 str, wxuser: &'life2 str, component_phone: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterPersonalWeappResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

快速创建个人小程序(对应 Java fastRegisterPersonalWeapp(String idname, String wxuser, String componentPhone))。
查询个人小程序注册任务状态(对应 Java fastRegisterPersonalWeappSearch(String taskid))。
Source§

fn fast_register_beta_weapp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, openid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterBetaWeappResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

注册试用小程序(对应 Java fastRegisterBetaWeapp(String name, String openid);注入键 “access_token”)。
Source§

fn register_shop<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, wx_name: &'life1 str, id_card_name: &'life2 str, id_card_number: &'life3 str, channel_id: Option<&'life4 str>, api_openstore_type: Option<i32>, auth_page_url: Option<&'life5 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

注册小商店账号(对应 Java registerShop(String wxName, String idCardName, String idCardNumber, String channelId, Integer apiOpenstoreType, String authPageUrl))。
Source§

fn check_audit_status<'life0, 'life1, 'async_trait>( &'life0 self, wx_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

异步状态查询(对应 Java checkAuditStatus(String wxName), component_access_token 查询小商店注册状态)。
Source§

fn check_audit_status_with_appid<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, wx_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

已获取小商店 appId 后以授权方 access_token 查询状态(对应 Java checkAuditStatus(String appId, String wxName))。
Source§

fn submit_merchant_info<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, app_id: &'life1 str, subject_type: &'life2 str, busi_license: &'life3 MinishopBusiLicense, organization_code_info: Option<&'life4 MinishopOrganizationCodeInfo>, idcard_info: Option<&'life5 MinishopIdcardInfo>, super_administrator_info: Option<&'life6 MinishopSuperAdministratorInfo>, merchant_shortname: Option<&'life7 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait,

提交小商店商户信息(对应 Java submitMerchantInfo(String appId, String subjectType, MinishopBusiLicense busiLicense, MinishopOrganizationCodeInfo organizationCodeInfo, MinishopIdcardInfo idcardInfo, MinishopSuperAdministratorInfo superAdministratorInfo, String merchantShoprtName),授权方 access_token)。
Source§

fn submit_basic_info<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, app_id: &'life1 str, name_info: &'life2 MinishopNameInfo, return_info: &'life3 MinishopReturnInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

提交小商店基础信息(对应 Java submitBasicInfo(String appId, MinishopNameInfo nameInfo, MinishopReturnInfo returnInfo), 授权方 access_token)。
Source§

fn upload_minishop_image_pic_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, height: i32, width: i32, file_path: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopImageUploadResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

上传小商店图片素材(对应 Java uploadMinishopImagePicFile(String appId, Integer height, Integer width, File file))。 Read more
Source§

fn get_minishop_categories<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, f_cat_id: i32, ) -> Pin<Box<dyn Future<Output = Result<MinishopCategories, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店的类目详情(对应 Java getMinishopCategories(String appId, Integer fCatId)f_cat_id 可先填 0 获取根部类目)。
Source§

fn get_minishop_brands<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopBrandList, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店品牌信息(对应 Java getMinishopBrands(String appId))。
Source§

fn get_minishop_delivery_template<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopDeliveryTemplateResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店运费模版信息(对应 Java getMinishopDeliveryTemplate(String appId))。
Source§

fn get_minishop_cat_list<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopShopCatList, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店商品分类信息(对应 Java getMinishopCatList(String appId))。
Source§

fn get_minishop_delivery_company<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店的快递公司列表(对应 Java getMinishopDeliveryCompany(String appId),返回 WxMinishopAddGoodsSpuResult<List<WxMinishopDeliveryCompany>>; Rust 侧 WxMinishopAddGoodsSpuResult.dataserde_json::Value 承载 company_list 数组,ADAPTED)。
Source§

fn minishop_create_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

创建小商店优惠券(对应 Java minishopCreateCoupon(String appId, WxMinishopCoupon couponInfo),返回 couponId)。
Source§

fn minishop_get_coupon_list<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, app_id: &'life1 str, _start_create_time: &'life2 str, _end_create_time: &'life3 str, _status: i32, _page: i32, _page_size: i32, ) -> Pin<Box<dyn Future<Output = Result<Option<WxMinishopCouponStock>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取小商店的优惠券信息(对应 Java minishopGetCouponList(String appId, String startCreateTime, String endCreateTime, Integer status, Integer page, Integer pageSize))。 Read more
Source§

fn minishop_push_coupon_to_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, open_id: &'life2 str, coupon_id: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

将优惠券发送给某人(对应 Java minishopPushCouponToUser(String appid, String openId, Integer couponId))。
Source§

fn minishop_update_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

更新商城优惠券(对应 Java minishopUpdateCoupon(String appId, WxMinishopCoupon couponInfo),返回 couponId)。
Source§

fn minishop_update_coupon_status<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, coupon_id: i32, status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新优惠券状态(对应 Java minishopUpdateCouponStatus(String appId, Integer couponId, Integer status);1 创建 2 生效 4 作废 5 删除)。
Source§

fn minishop_goods_add_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店添加商品(对应 Java minishopGoodsAddSpu(String appId, WxMinishopSpu spu),添加后需上架并过审才展示)。
Source§

fn minishop_goods_del_spu<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

小商店删除商品(对应 Java minishopGoodsDelSpu(String appId, Long productId, Long outProductId),直接删除不进回收站)。
Source§

fn minishop_goods_update_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新商品(对应 Java minishopGoodsUpdateSpu(String appId, WxMinishopSpu spu),更新入草稿箱,需上架过审)。
Source§

fn minishop_goods_listing_spu<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

上架商品(对应 Java minishopGoodsListingSpu(String appId, Long productId, Long outProductId))。
Source§

fn minishop_goods_delisting_spu<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

下架商品(对应 Java minishopGoodsDelistingSpu(String appId, Long productId, Long outProductId))。
Source§

fn minishop_goods_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店新增 sku 信息(对应 Java minishiopGoodsAddSku(String appId, WxMinishopSku sku),Java 方法名拼写为 minishop + Goods 少 i)。
Source§

fn minishop_goods_batch_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, sku_list: &'life2 [WxMinishopSku], ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店批量新增 sku 信息(对应 Java minishopGoodsBatchAddSku(String appId, List<WxMinishopSku> skuList))。
Source§

fn minishop_goods_del_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, out_sku_id: &'life2 str, sku_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店删除 sku 信息(对应 Java minishopGoodsDelSku(String appId, Long productId, Long outProductId, String outSkuId, Long skuId))。
Source§

fn minishop_goods_update_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku(对应 Java minishopGoodsUpdateSku(String appId, WxMinishopSku sku))。
Source§

fn minishop_goods_update_sku_price<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, out_sku_id: &'life2 str, sku_id: i64, _sale_price: i64, _market_price: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku 价格(对应 Java minishopGoodsUpdateSkuPrice(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Long salePrice, Long marketPrice))。 Read more
Source§

fn minishop_goods_update_sku_stock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, product_id: i64, out_product_id: i64, out_sku_id: &'life2 str, sku_id: i64, type: i32, stock_num: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku 库存(对应 Java minishopGoodsUpdateSkuStock(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Integer type, Integer stockNum))。
Source§

fn minishop_common_post<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _url: &'life2 str, _request_param: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

小商店通用 Post 接口(对应 Java minishopCommonPost(String appId, String url, String requestParam))。 Read more
Source§

fn add_limit_discount_goods<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, limit_discount_goods: &'life2 LimitDiscountGoods, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

添加抢购任务(对应 Java addLimitDiscountGoods(String appId, LimitDiscountGoods limitDiscountGoods),返回 taskId)。
Source§

fn get_limit_discount_list<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, status: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LimitDiscountGoods>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取抢购任务列表(对应 Java getLimitDiscountList(String appId, Integer status);status 0 未结束 1 已结束,不填则都拉取)。
Source§

fn update_limit_discount_status<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, task_id: i64, status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

修改抢购任务状态(对应 Java updateLimitDiscountStatus(String appId, Long taskId, Integer status),结束后不可再开启)。
Source§

fn get_share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, appids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<GetShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

查询环境共享信息(对应 Java getShareCloudBaseEnv(List<String> appids))。
Source§

fn get_tcb_env_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetTcbEnvListResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取环境信息(对应 Java getTcbEnvList())。
Source§

fn change_tcb_env<'life0, 'life1, 'async_trait>( &'life0 self, env: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

转换云环境(对应 Java changeTcbEnv(String env))。
Source§

fn share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ShareCloudBaseEnvRequest, ) -> Pin<Box<dyn Future<Output = Result<ShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

环境共享(对应 Java shareCloudBaseEnv(ShareCloudBaseEnvRequest request))。
Source§

fn clear_quota_v2<'life0, 'life1, 'async_trait>( &'life0 self, appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

使用 AppSecret 重置第三方平台 API 调用次数(对应 Java clearQuotaV2(String appid),裸 post 不经 token 注入)。
Source§

fn apply_set_order_path_info<'life0, 'life1, 'async_trait>( &'life0 self, info: &'life1 WxOpenMaApplyOrderPathInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

申请设置订单页 path 信息(对应 Java applySetOrderPathInfo(WxOpenMa ApplyOrderPathInfo info),一次提交不超过 100 个 appid)。
Source§

fn modify_wxa_server_domain<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, action: &'life1 str, request_domains: &'life2 [String], ws_request_domains: &'life3 [String], upload_domains: &'life4 [String], download_domains: &'life5 [String], udp_domains: &'life6 [String], tcp_domains: &'life7 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait,

设置第三方平台服务器域名(对应 Java modifyWxaServerDomain(String action, List<String> requestDomains, ...);action:add 添加 / delete 删除 / set 覆盖 / get 获取,get 时不需要域名参数)。
Source§

fn get_domain_confirm_file<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainConfirmFileResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取第三方平台业务域名校验文件(对应 Java getDomainConfirmFile())。
Source§

fn modify_wxa_jump_domain<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, action: &'life1 str, domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

设置第三方平台业务域名(对应 Java modifyWxaJumpDomain(String action, List<String> domainList),直接返回字符串)。
Source§

fn modify_wxa_jump_domain_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, action: &'life1 str, domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaWebDomainResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

设置第三方平台业务域名(对应 Java modifyWxaJumpDomainInfo(String action, List<String> domainList),解析为 webview domain 信息)。
Source§

fn check_signature(&self, timestamp: &str, nonce: &str, signature: &str) -> bool

校验消息签名(对应 Java checkSignature(String, String, String))。 Read more
Source§

fn wx_open_config_storage(&self) -> Option<Arc<dyn WxOpenConfigStorage>>

配置存储(对应 Java getWxOpenConfigStorage(),委托门面)。 Read more
Source§

fn check_signature_with_appid( &self, _app_id: &str, _timestamp: &str, _nonce: &str, _signature: &str, ) -> bool

校验消息签名(对应 Java checkSignature(String appid, String timestamp, String nonce, String signature))。 Read more
Source§

fn oauth2_build_authorization_url( &self, app_id: &str, redirect_uri: &str, scope: &str, state: &str, ) -> String

构建 oauth2 授权链接(对应 Java oauth2buildAuthorizationUrl(String appid, String redirectUri, String scope, String state))。 Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more