pub struct Async { /* private fields */ }Expand description
Default async transport backed by the crate HttpClient.
Trait Implementations§
Source§impl Default for Async
Available on WebAssembly or crate feature bitreq or crate feature reqwest only.
impl Default for Async
Available on WebAssembly or crate feature
bitreq or crate feature reqwest only.Source§impl Transport for Async
impl Transport for Async
Source§fn with_proxy(
&mut self,
proxy: Url,
host_matcher: Option<&str>,
accept_invalid_certs: bool,
) -> Result<(), HttpError>
fn with_proxy( &mut self, proxy: Url, host_matcher: Option<&str>, accept_invalid_certs: bool, ) -> Result<(), HttpError>
Make the transport use a proxy. Read more
Source§fn http_get<'life0, 'async_trait, R>(
&'life0 self,
url: Url,
auth: Option<AuthToken>,
) -> Pin<Box<dyn Future<Output = Result<R, HttpError>> + Send + 'async_trait>>where
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn http_get<'life0, 'async_trait, R>(
&'life0 self,
url: Url,
auth: Option<AuthToken>,
) -> Pin<Box<dyn Future<Output = Result<R, HttpError>> + Send + 'async_trait>>where
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
HTTP GET request.
Source§fn http_get_raw<'life0, 'async_trait>(
&'life0 self,
url: Url,
auth: Option<AuthToken>,
) -> Pin<Box<dyn Future<Output = Result<RawResponse, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn http_get_raw<'life0, 'async_trait>(
&'life0 self,
url: Url,
auth: Option<AuthToken>,
) -> Pin<Box<dyn Future<Output = Result<RawResponse, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
HTTP GET request returning a raw response.
Source§fn http_post<'life0, 'life1, 'async_trait, P, R>(
&'life0 self,
url: Url,
auth_token: Option<AuthToken>,
payload: &'life1 P,
) -> Pin<Box<dyn Future<Output = Result<R, HttpError>> + Send + 'async_trait>>where
P: Serialize + Send + Sync + 'async_trait,
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn http_post<'life0, 'life1, 'async_trait, P, R>(
&'life0 self,
url: Url,
auth_token: Option<AuthToken>,
payload: &'life1 P,
) -> Pin<Box<dyn Future<Output = Result<R, HttpError>> + Send + 'async_trait>>where
P: Serialize + Send + Sync + 'async_trait,
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
HTTP POST request.
Source§fn http_post_form_raw<'life0, 'life1, 'async_trait, P>(
&'life0 self,
url: Url,
auth_token: Option<AuthToken>,
payload: &'life1 P,
) -> Pin<Box<dyn Future<Output = Result<RawResponse, HttpError>> + Send + 'async_trait>>
fn http_post_form_raw<'life0, 'life1, 'async_trait, P>( &'life0 self, url: Url, auth_token: Option<AuthToken>, payload: &'life1 P, ) -> Pin<Box<dyn Future<Output = Result<RawResponse, HttpError>> + Send + 'async_trait>>
HTTP POST request with a form body returning a raw response.
Source§fn ws_connect<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<(WsSender, WsReceiver), WsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn ws_connect<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<(WsSender, WsReceiver), WsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Connect to a WebSocket endpoint using this transport.
Source§fn resolve_dns_txt<'life0, 'life1, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_dns_txt<'life0, 'life1, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
DNS resolver to get TXT records from a domain name. Read more
Auto Trait Implementations§
impl Freeze for Async
impl RefUnwindSafe for Async
impl Send for Async
impl Sync for Async
impl Unpin for Async
impl UnsafeUnpin for Async
impl UnwindSafe for Async
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more