pub trait WxOpenMaBasicService: Send + Sync {
Show 16 methods
// Required methods
fn get_account_basic_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaAccountBasicInfoResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_nickname<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
id_card: &'life2 str,
license: &'life3 str,
naming_other_stuff1: &'life4 str,
naming_other_stuff2: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaSetNickameResult, 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;
fn query_set_nickname_status<'life0, 'life1, 'async_trait>(
&'life0 self,
audit_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaQueryNicknameStatusResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn check_wx_verify_nickname<'life0, 'life1, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaCheckNickameResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn modify_head_image<'life0, 'life1, 'async_trait>(
&'life0 self,
head_img_media_id: &'life1 str,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn modify_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signature: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_component_rebind_admin_url(
&self,
redirect_uri: &str,
app_id: &str,
) -> String;
fn component_rebind_admin<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_all_categories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_categories_by_type<'life0, 'life1, 'async_trait>(
&'life0 self,
verify_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenGetAllCategoriesByTypeResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category_list: &'life1 [WxFastMaCategory],
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_category<'life0, 'async_trait>(
&'life0 self,
first: i32,
second: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_category<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaBeenSetCategoryResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn modify_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category: &'life1 WxFastMaCategory,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_all_category_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaCategoryNameListResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_order_path_info<'life0, 'async_trait>(
&'life0 self,
info_type: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaGetOrderPathResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
微信第三方平台 小程序基础信息服务(对应 Java WxOpenMaBasicService)。
Required Methods§
Sourcefn get_account_basic_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaAccountBasicInfoResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_basic_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaAccountBasicInfoResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取小程序的信息(对应 Java getAccountBasicInfo(),GET 请求)。
Sourcefn set_nickname<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
id_card: &'life2 str,
license: &'life3 str,
naming_other_stuff1: &'life4 str,
naming_other_stuff2: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaSetNickameResult, 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,
fn set_nickname<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
id_card: &'life2 str,
license: &'life3 str,
naming_other_stuff1: &'life4 str,
naming_other_stuff2: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaSetNickameResult, 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 setNickname(String nickname, String idCard, String license, String namingOtherStuff1, String namingOtherStuff2))。
若接口未返回 audit_id,说明名称已直接设置成功,无需审核;若返回
audit_id 则名称正在审核中。id_card 身份证照片临时素材 mediaid
(个人号必填);license 组织机构代码证或营业执照临时素材 mediaid
(组织号必填);naming_other_stuff_1/2 其他证明材料 mediaid。
Sourcefn query_set_nickname_status<'life0, 'life1, 'async_trait>(
&'life0 self,
audit_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaQueryNicknameStatusResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_set_nickname_status<'life0, 'life1, 'async_trait>(
&'life0 self,
audit_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaQueryNicknameStatusResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
小程序改名审核状态查询(对应 Java
querySetNicknameStatus(String auditId))。
Sourcefn check_wx_verify_nickname<'life0, 'life1, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaCheckNickameResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_wx_verify_nickname<'life0, 'life1, 'async_trait>(
&'life0 self,
nickname: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaCheckNickameResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
微信认证名称检测(对应 Java
checkWxVerifyNickname(String nickname))。
Sourcefn modify_head_image<'life0, 'life1, 'async_trait>(
&'life0 self,
head_img_media_id: &'life1 str,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn modify_head_image<'life0, 'life1, 'async_trait>(
&'life0 self,
head_img_media_id: &'life1 str,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
修改头像(对应 Java modifyHeadImage(String headImgMediaId, float x1, float y1, float x2, float y2))。
图片格式只支持 BMP/JPEG/JPG/GIF/PNG,大小不超过 2M;实际头像
始终为正方形。x1/y1 裁剪框左上角坐标、x2/y2 右下角坐标
(取值范围 [0, 1])。
Sourcefn modify_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signature: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn modify_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signature: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
修改功能介绍(对应 Java modifySignature(String signature),
简介 4-120 字)。
Sourcefn get_component_rebind_admin_url(
&self,
redirect_uri: &str,
app_id: &str,
) -> String
fn get_component_rebind_admin_url( &self, redirect_uri: &str, app_id: &str, ) -> String
获取换绑管理员 URL(对应 Java
getComponentRebindAdminUrl(String redirectUri, String appId))。
Java 以 URLEncoder.encode(redirectUri, "UTF-8")(表单编码:
空格 → +)编码后按 URL_COMPONENT_REBIND_ADMIN 格式化
(%s:appid / component_appid / 编码后 redirect_uri),纯字符串
构建不抛错(Java @SneakyThrows 吞掉 UnsupportedEncodingException)。
Sourcefn component_rebind_admin<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn component_rebind_admin<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
管理员换绑(对应 Java componentRebindAdmin(String taskId);
task_id 为公众平台最终点击提交回跳到第三方平台时携带的换绑
管理员任务序列号)。
Sourcefn get_all_categories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_categories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取账号可以设置的所有类目(对应 Java getAllCategories(),
直接返回原始字符串)。
因为不同类目含有特定字段,目前没有完整的类目信息数据,为保证 兼容性,Java 放弃将 response 转换为实体。
Sourcefn get_all_categories_by_type<'life0, 'life1, 'async_trait>(
&'life0 self,
verify_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenGetAllCategoriesByTypeResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_all_categories_by_type<'life0, 'life1, 'async_trait>(
&'life0 self,
verify_type: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WxOpenGetAllCategoriesByTypeResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
获取不同类型主体可设置的类目(对应 Java
getAllCategoriesByType(String verifyType))。
Sourcefn add_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category_list: &'life1 [WxFastMaCategory],
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category_list: &'life1 [WxFastMaCategory],
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
添加类目(对应 Java addCategory(List<WxFastMaCategory> categoryList))。
Sourcefn delete_category<'life0, 'async_trait>(
&'life0 self,
first: i32,
second: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_category<'life0, 'async_trait>(
&'life0 self,
first: i32,
second: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
删除类目(对应 Java deleteCategory(int first, int second);
first 一级类目 ID,second 二级类目 ID)。
Sourcefn get_category<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaBeenSetCategoryResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_category<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxFastMaBeenSetCategoryResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取账号已经设置的所有类目(对应 Java getCategory(),GET 请求)。
Sourcefn modify_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category: &'life1 WxFastMaCategory,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn modify_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category: &'life1 WxFastMaCategory,
) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
修改类目(对应 Java modifyCategory(WxFastMaCategory category))。
Sourcefn get_all_category_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaCategoryNameListResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_category_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaCategoryNameListResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取类目名称信息(对应 Java getAllCategoryName(),GET 请求;
用于给用户展示选择)。
Sourcefn get_order_path_info<'life0, 'async_trait>(
&'life0 self,
info_type: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaGetOrderPathResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_order_path_info<'life0, 'async_trait>(
&'life0 self,
info_type: i32,
) -> Pin<Box<dyn Future<Output = Result<WxOpenMaGetOrderPathResult, WxErrorException>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取订单页 path 信息(对应 Java getOrderPathInfo(int infoType);
info_type:0 线上版,1 审核版)。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".