pub trait ClientTrait {
Show 13 methods
// Required methods
fn access_token(
&self,
) -> impl Future<Output = Result<String, WechatError>> + Send;
fn refresh_access_token(
&mut self,
) -> impl Future<Output = Result<(), WechatError>> + Send;
fn http_client(&self) -> &Client;
// Provided methods
fn url_with_query<I, K, V>(
&self,
url: &str,
queries: I,
) -> Result<Url, WechatError>
where I: IntoIterator,
<I as IntoIterator>::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str> { ... }
fn authorized_url(
&self,
url: &str,
) -> impl Future<Output = Result<Url, WechatError>> + Send
where Self: Sync { ... }
fn get_empty<R, U>(
&self,
url: U,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
Self: Sync { ... }
fn get<R, U, T>(
&self,
url: U,
query: &T,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
T: Serialize + Sync + ?Sized,
Self: Sync { ... }
fn post_empty<R, U>(
&self,
url: U,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
Self: Sync { ... }
fn post<R, U, T>(
&self,
url: U,
data: &T,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
T: Serialize + Sync + ?Sized,
Self: Sync { ... }
fn upload<R, U>(
&self,
url: U,
multipart: Form,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
Self: Sync { ... }
fn upload_with<R, U, T>(
&self,
url: U,
data: &T,
multipart: Form,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
T: Serialize + Sync + ?Sized,
Self: Sync { ... }
fn json<R, U, T>(
&self,
url: U,
data: &T,
) -> impl Future<Output = Result<R, WechatError>> + Send
where R: DeserializeOwned,
U: IntoUrl + Send,
T: Serialize + Sync + ?Sized,
Self: Sync { ... }
fn download<U, T>(
&self,
url: U,
query: &T,
) -> impl Future<Output = Result<Vec<u8>, WechatError>> + Send
where U: IntoUrl + Send,
T: Serialize + Sync + ?Sized,
Self: Sync { ... }
}
Required Methods§
fn access_token( &self, ) -> impl Future<Output = Result<String, WechatError>> + Send
fn refresh_access_token( &mut self, ) -> impl Future<Output = Result<(), WechatError>> + Send
fn http_client(&self) -> &Client
Provided Methods§
fn url_with_query<I, K, V>( &self, url: &str, queries: I, ) -> Result<Url, WechatError>
fn get_empty<R, U>( &self, url: U, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn get<R, U, T>( &self, url: U, query: &T, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn post_empty<R, U>( &self, url: U, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn post<R, U, T>( &self, url: U, data: &T, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn upload<R, U>( &self, url: U, multipart: Form, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn upload_with<R, U, T>( &self, url: U, data: &T, multipart: Form, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn json<R, U, T>( &self, url: U, data: &T, ) -> impl Future<Output = Result<R, WechatError>> + Send
fn download<U, T>( &self, url: U, query: &T, ) -> impl Future<Output = Result<Vec<u8>, WechatError>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.