Skip to main content

WxOpenMaBasicServiceImpl

Struct WxOpenMaBasicServiceImpl 

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

小程序基础信息服务实现(对应 Java WxOpenMaBasicServiceImpl)。

Implementations§

Source§

impl WxOpenMaBasicServiceImpl

Source

pub fn new(wx_open_service: Arc<dyn WxOpenService>, app_id: String) -> Self

构建服务(对应 Java new WxOpenMaBasicServiceImpl(WxMaService, WxOpenComponentService); Rust 以门面弱引用统一表达两个依赖,ADAPTED)。

Source

pub fn app_id(&self) -> &str

授权方 appid(Java 构造入参,代运营目标账号)。

Trait Implementations§

Source§

impl WxOpenMaBasicService for WxOpenMaBasicServiceImpl

Source§

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 空参数 → WxFastMaAccountBasicInfoResult)。

Source§

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(...):POST {"nick_name","id_card","license","naming_other_stuff_1", "naming_other_stuff_2"}WxFastMaSetNickameResult)。

Source§

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):POST {"audit_id": ...})。

Source§

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):POST {"nick_name": ...})。

Source§

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(...):POST {"head_img_media_id","x1","y1","x2","y2"},坐标以 f32 镜像 Java float)。

Source§

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): POST {"signature": ...})。

Source§

fn get_component_rebind_admin_url( &self, redirect_uri: &str, app_id: &str, ) -> String

获取换绑管理员 URL(对应 Java getComponentRebindAdminUrl(String redirectUri, String appId))。

redirect_uri 经 URLEncoder.encode(..., "UTF-8") 语义编码(空格 → +)后按 URL_COMPONENT_REBIND_ADMIN 格式化;纯字符串构建 不抛错。

Source§

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): POST {"taskid": ...})。

Source§

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(): GET 空参数,直接返回原始字符串)。

Source§

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):POST {"verify_type": ...})。

Source§

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):POST {"categories": [...]})。

Source§

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): POST {"first": ..., "second": ...})。

Source§

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 空 参数 → WxFastMaBeenSetCategoryResult)。

Source§

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): POST 实体序列化)。

Source§

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 空参数)。

Source§

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): POST {"info_type": ...};0 线上版,1 审核版)。

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