ip2locationio 1.1.0

Rust client for IP2Location.io API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Ip2LocationError {
    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error),
    #[error("URL parse error: {0}")]
    Url(#[from] url::ParseError),
    #[error("API error {status}: {message}")]
    ApiError { status: u16, message: String },
    #[error("Invalid input: {0}")]
    InvalidInput(String),
    #[error("JSON parse error: {0}")]
    Json(#[from] serde_json::Error),
}