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