pub trait AsyncIpApi: IpApi {
// Required methods
fn query_api_default(
&self,
ip: &str,
) -> impl Future<Output = Result<IpDefaultResponse, IpApiError>> + Send;
fn query_api_fully(
&self,
ip: &str,
) -> impl Future<Output = Result<IpFullResponse, IpApiError>> + Send;
fn query_api<T>(
&self,
ip: &str,
) -> impl Future<Output = Result<T, IpApiError>> + Send
where T: DeserializeOwned;
fn get_http_client(&self) -> &Client;
}
Expand description
The async client for the ip-api.com API.
Required Methods§
Sourcefn query_api_default(
&self,
ip: &str,
) -> impl Future<Output = Result<IpDefaultResponse, IpApiError>> + Send
fn query_api_default( &self, ip: &str, ) -> impl Future<Output = Result<IpDefaultResponse, IpApiError>> + Send
Sourcefn query_api_fully(
&self,
ip: &str,
) -> impl Future<Output = Result<IpFullResponse, IpApiError>> + Send
fn query_api_fully( &self, ip: &str, ) -> impl Future<Output = Result<IpFullResponse, IpApiError>> + Send
Sourcefn query_api<T>(
&self,
ip: &str,
) -> impl Future<Output = Result<T, IpApiError>> + Sendwhere
T: DeserializeOwned,
fn query_api<T>(
&self,
ip: &str,
) -> impl Future<Output = Result<T, IpApiError>> + Sendwhere
T: DeserializeOwned,
Sourcefn get_http_client(&self) -> &Client
fn get_http_client(&self) -> &Client
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.