pub trait RequestExecutor<T, E>: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str,
data: E,
wx_type: WxType,
) -> Pin<Box<dyn Future<Output = Result<T, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
HTTP 请求执行器策略。
对应 Java RequestExecutor<T, E> 接口;在 Rust 中以 async trait 表达。
每个 Java 执行器类(SimpleGet/Post、MediaUpload/Download 等)对应一个
Rust 实现结构体,持有 reqwest::Client。
§类型参数
T:返回值类型E:请求参数类型
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".