Debian Codegraph @

src/geoip2.rs

raw symbols SCIP
1 //! GeoIP2 and GeoLite2 database record structures
2 //!
3 //! This module provides strongly-typed Rust structures that correspond to the
4 //! various GeoIP2 and GeoLite2 database record formats.
5 //!
6 //! # Record Types
7 //!
8 //! - [`City`] - Complete city-level geolocation data (most comprehensive)
9 //! - [`Country`] - Country-level geolocation data
10 //! - [`Enterprise`] - Enterprise database with additional confidence scores
11 //! - [`Isp`] - Internet Service Provider information
12 //! - [`AnonymousIp`] - Anonymous proxy and VPN detection
13 //! - [`ConnectionType`] - Connection type classification
14 //! - [`Domain`] - Domain information
15 //! - [`Asn`] - Autonomous System Number data
16 //! - [`DensityIncome`] - Population density and income data
17 //!
18 //! # Usage Examples
19 //!
20 //! ```rust
21 //! use maxminddb::{Reader, geoip2};
22 //! use std::net::IpAddr;
23 //!
24 //! # fn main() -> Result<(), maxminddb::MaxMindDbError> {
25 //! let reader = Reader::open_readfile(
26 //! "test-data/test-data/GeoIP2-City-Test.mmdb")?;
27 //! let ip: IpAddr = "89.160.20.128".parse().unwrap();
28 //!
29 //! // City lookup - nested structs are always present (default to empty)
30 //! let result = reader.lookup(ip)?;
31 //! if let Some(city) = result.decode::<geoip2::City>()? {
32 //! // Direct access to nested structs - no Option unwrapping needed
33 //! if let Some(name) = city.city.names.english {
34 //! println!("City: {}", name);
35 //! }
36 //! if let Some(code) = city.country.iso_code {
37 //! println!("Country: {}", code);
38 //! }
39 //! // Subdivisions is a Vec, empty if not present
40 //! for sub in &city.subdivisions {
41 //! if let Some(code) = sub.iso_code {
42 //! println!("Subdivision: {}", code);
43 //! }
44 //! }
45 //! }
46 //!
47 //! // Country-only lookup (smaller/faster)
48 //! let result = reader.lookup(ip)?;
49 //! if let Some(country) = result.decode::<geoip2::Country>()? {
50 //! if let Some(name) = country.country.names.english {
51 //! println!("Country: {}", name);
52 //! }
53 //! }
54 //! # Ok(())
55 //! # }
56 //! ```
57
58 use serderust-analyzer cargo serde 1.0.229 crate/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize#};
59
60 /// Localized names for geographic entities.
61 ///
62 /// Contains name translations in the languages supported by MaxMind databases.
63 /// Access names directly via fields like `names.english` or `names.german`.
64 /// Each field is `Option<&str>` - `None` if not available in that language.
65 ///
66 /// # Example
67 ///
68 /// ```
69 /// use maxminddb::{Reader, geoip2};
70 /// use std::net::IpAddr;
71 ///
72 /// let reader = Reader::open_readfile("test-data/test-data/GeoIP2-City-Test.mmdb").unwrap();
73 /// let ip: IpAddr = "89.160.20.128".parse().unwrap();
74 /// let result = reader.lookup(ip).unwrap();
75 ///
76 /// if let Some(city) = result.decode::<geoip2::City>().unwrap() {
77 /// // Access names directly - Option<&str>
78 /// if let Some(name) = city.city.names.english {
79 /// println!("City (en): {}", name);
80 /// }
81 /// if let Some(name) = city.city.names.german {
82 /// println!("City (de): {}", name);
83 /// }
84 /// }
85 /// ```
86 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
87 pub struct Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a> {
88 /// German name (de)
89 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(
90 borrow,
91 rename = "de",
92 default,
93 skip_serializing_if = "Option::is_none"
94 )]
95 pub germanrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#german.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
96 /// English name (en)
97 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "en", default, skip_serializing_if = "Option::is_none")]
98 pub englishrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#english.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
99 /// Spanish name (es)
100 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "es", default, skip_serializing_if = "Option::is_none")]
101 pub spanishrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#spanish.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
102 /// French name (fr)
103 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "fr", default, skip_serializing_if = "Option::is_none")]
104 pub frenchrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#french.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
105 /// Japanese name (ja)
106 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "ja", default, skip_serializing_if = "Option::is_none")]
107 pub japaneserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#japanese.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
108 /// Brazilian Portuguese name (pt-BR)
109 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "pt-BR", default, skip_serializing_if = "Option::is_none")]
110 pub brazilian_portugueserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#brazilian_portuguese.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
111 /// Russian name (ru)
112 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "ru", default, skip_serializing_if = "Option::is_none")]
113 pub russianrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#russian.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
114 /// Simplified Chinese name (zh-CN)
115 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "zh-CN", default, skip_serializing_if = "Option::is_none")]
116 pub simplified_chineserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#simplified_chinese.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
117 }
118
119 impl Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'_> {
120 /// Returns true if all name fields are `None`.
121 #[must_use]
122 pub fn is_emptyrust-analyzer cargo maxminddb 0.30.0 geoip2/impl#[`Names<'_>`]is_empty().(&self) -> bool {
123 self.germanrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#german..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
124 && self.englishrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#english..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
125 && self.spanishrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#spanish..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
126 && self.frenchrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#french..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
127 && self.japaneserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#japanese..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
128 && self.brazilian_portugueserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#brazilian_portuguese..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
129 && self.russianrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#russian..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
130 && self.simplified_chineserust-analyzer cargo maxminddb 0.30.0 geoip2/Names#simplified_chinese..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
131 }
132 }
133
134 macro_rules! impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default! {
135 ($ty:ty) => {
136 impl $ty {
137 /// Returns true if all fields are empty/None.
138 #[must_use]
139 pub fn is_empty(&self) -> bool {
140 *self == Self::default()
141 }
142 }
143 };
144 }
145
146 /// GeoIP2/GeoLite2 Country database record.
147 ///
148 /// Contains country-level geolocation data for an IP address. This is the
149 /// simplest geolocation record type, suitable when you only need country
150 /// information.
151 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
152 pub struct Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#<'a> {
153 /// Continent data for the IP address.
154 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "country::Continent::is_empty")]
155 pub continentrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#continent.: countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#<'a>,
156 /// Country where MaxMind believes the IP is located.
157 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "country::Country::is_empty")]
158 pub countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#country.: countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'a>,
159 /// Country where the ISP has registered the IP block.
160 /// May differ from `country` (e.g., for mobile networks or VPNs).
161 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "country::Country::is_empty")]
162 pub registered_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#registered_country.: countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'a>,
163 /// Country represented by users of this IP (e.g., military base or embassy).
164 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "country::RepresentedCountry::is_empty")]
165 pub represented_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#represented_country.: countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#<'a>,
166 /// Various traits associated with the IP address.
167 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "country::Traits::is_empty")]
168 pub traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/Country#traits.: countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits#,
169 }
170
171 /// GeoIP2/GeoLite2 City database record.
172 ///
173 /// Contains city-level geolocation data including location coordinates,
174 /// postal code, subdivisions (states/provinces), and country information.
175 /// This is the most comprehensive free geolocation record type.
176 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
177 pub struct Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/City#<'a> {
178 /// City data for the IP address.
179 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "city::City::is_empty")]
180 pub cityrust-analyzer cargo maxminddb 0.30.0 geoip2/City#city.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/City#<'a>,
181 /// Continent data for the IP address.
182 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Continent::is_empty")]
183 pub continentrust-analyzer cargo maxminddb 0.30.0 geoip2/City#continent.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#<'a>,
184 /// Country where MaxMind believes the IP is located.
185 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Country::is_empty")]
186 pub countryrust-analyzer cargo maxminddb 0.30.0 geoip2/City#country.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'a>,
187 /// Location data including coordinates and time zone.
188 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Location::is_empty")]
189 pub locationrust-analyzer cargo maxminddb 0.30.0 geoip2/City#location.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#<'a>,
190 /// Postal code data for the IP address.
191 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Postal::is_empty")]
192 pub postalrust-analyzer cargo maxminddb 0.30.0 geoip2/City#postal.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Postal#<'a>,
193 /// Country where the ISP has registered the IP block.
194 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Country::is_empty")]
195 pub registered_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/City#registered_country.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'a>,
196 /// Country represented by users of this IP (e.g., military base or embassy).
197 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::RepresentedCountry::is_empty")]
198 pub represented_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/City#represented_country.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#<'a>,
199 /// Subdivisions (states, provinces, etc.) ordered from largest to smallest.
200 /// For example, Oxford, UK would have England first, then Oxfordshire.
201 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")]
202 pub subdivisionsrust-analyzer cargo maxminddb 0.30.0 geoip2/City#subdivisions.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#<'a>>,
203 /// Various traits associated with the IP address.
204 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "city::Traits::is_empty")]
205 pub traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/City#traits.: cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/::Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits#,
206 }
207
208 /// GeoIP2 Enterprise database record.
209 ///
210 /// Contains all City data plus additional confidence scores and traits.
211 /// Enterprise records include confidence values (0-100) indicating MaxMind's
212 /// certainty about the accuracy of each field.
213 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
214 pub struct Enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#<'a> {
215 /// City data with confidence score.
216 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "enterprise::City::is_empty")]
217 pub cityrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#city.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#<'a>,
218 /// Continent data for the IP address.
219 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Continent::is_empty")]
220 pub continentrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#continent.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#<'a>,
221 /// Country data with confidence score.
222 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Country::is_empty")]
223 pub countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#country.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#<'a>,
224 /// Location data including coordinates and time zone.
225 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Location::is_empty")]
226 pub locationrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#location.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#<'a>,
227 /// Postal code data with confidence score.
228 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Postal::is_empty")]
229 pub postalrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#postal.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Postal#<'a>,
230 /// Country where the ISP has registered the IP block.
231 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Country::is_empty")]
232 pub registered_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#registered_country.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#<'a>,
233 /// Country represented by users of this IP (e.g., military base or embassy).
234 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(
235 default,
236 skip_serializing_if = "enterprise::RepresentedCountry::is_empty"
237 )]
238 pub represented_countryrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#represented_country.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#<'a>,
239 /// Subdivisions with confidence scores, ordered from largest to smallest.
240 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Vec::is_empty")]
241 pub subdivisionsrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#subdivisions.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#<'a>>,
242 /// Extended traits including ISP, organization, and connection information.
243 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "enterprise::Traits::is_empty")]
244 pub traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/Enterprise#traits.: enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/::Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#<'a>,
245 }
246
247 /// GeoIP2 ISP database record.
248 ///
249 /// Contains Internet Service Provider and organization information for an IP.
250 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
251 pub struct Isprust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#<'a> {
252 /// The autonomous system number (ASN) for the IP address.
253 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
254 pub autonomous_system_numberrust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#autonomous_system_number.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
255 /// The organization associated with the registered ASN.
256 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
257 pub autonomous_system_organizationrust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#autonomous_system_organization.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
258 /// The name of the ISP associated with the IP address.
259 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
260 pub isprust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#isp.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
261 /// The mobile country code (MCC) associated with the IP.
262 /// See <https://en.wikipedia.org/wiki/Mobile_country_code>.
263 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
264 pub mobile_country_coderust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#mobile_country_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
265 /// The mobile network code (MNC) associated with the IP.
266 /// See <https://en.wikipedia.org/wiki/Mobile_network_code>.
267 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
268 pub mobile_network_coderust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#mobile_network_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
269 /// The name of the organization associated with the IP address.
270 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
271 pub organizationrust-analyzer cargo maxminddb 0.30.0 geoip2/Isp#organization.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
272 }
273
274 /// GeoIP2 Connection-Type database record.
275 ///
276 /// Contains the connection type for an IP address.
277 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
278 pub struct ConnectionTyperust-analyzer cargo maxminddb 0.30.0 geoip2/ConnectionType#<'a> {
279 /// The connection type. Possible values include "Dialup", "Cable/DSL",
280 /// "Corporate", "Cellular", and "Satellite". Additional values may be
281 /// added in the future.
282 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
283 pub connection_typerust-analyzer cargo maxminddb 0.30.0 geoip2/ConnectionType#connection_type.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
284 }
285
286 /// GeoIP2 Anonymous IP database record.
287 ///
288 /// Contains information about whether an IP address is associated with
289 /// anonymous or proxy services.
290 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
291 pub struct AnonymousIprust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp# {
292 /// True if the IP belongs to any sort of anonymous network.
293 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
294 pub is_anonymousrust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_anonymous.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
295 /// True if the IP is registered to an anonymous VPN provider.
296 /// Note: If a VPN provider does not register subnets under names associated
297 /// with them, we will likely only flag their IP ranges using `is_hosting_provider`.
298 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
299 pub is_anonymous_vpnrust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_anonymous_vpn.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
300 /// True if the IP belongs to a hosting or VPN provider.
301 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
302 pub is_hosting_providerrust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_hosting_provider.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
303 /// True if the IP belongs to a public proxy.
304 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
305 pub is_public_proxyrust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_public_proxy.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
306 /// True if the IP is on a suspected anonymizing network and belongs to
307 /// a residential ISP.
308 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
309 pub is_residential_proxyrust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_residential_proxy.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
310 /// True if the IP is a Tor exit node.
311 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
312 pub is_tor_exit_noderust-analyzer cargo maxminddb 0.30.0 geoip2/AnonymousIp#is_tor_exit_node.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
313 }
314
315 /// GeoIP2 DensityIncome database record.
316 ///
317 /// Contains population density and income data for an IP address location.
318 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
319 pub struct DensityIncomerust-analyzer cargo maxminddb 0.30.0 geoip2/DensityIncome# {
320 /// The average income in US dollars associated with the IP address.
321 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
322 pub average_incomerust-analyzer cargo maxminddb 0.30.0 geoip2/DensityIncome#average_income.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
323 /// The estimated number of people per square kilometer.
324 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
325 pub population_densityrust-analyzer cargo maxminddb 0.30.0 geoip2/DensityIncome#population_density.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
326 }
327
328 /// GeoIP2 Domain database record.
329 ///
330 /// Contains the second-level domain associated with an IP address.
331 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
332 pub struct Domainrust-analyzer cargo maxminddb 0.30.0 geoip2/Domain#<'a> {
333 /// The second-level domain associated with the IP address
334 /// (e.g., "example.com").
335 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
336 pub domainrust-analyzer cargo maxminddb 0.30.0 geoip2/Domain#domain.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
337 }
338
339 /// GeoLite2 ASN database record.
340 ///
341 /// Contains Autonomous System Number (ASN) data for an IP address.
342 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
343 pub struct Asnrust-analyzer cargo maxminddb 0.30.0 geoip2/Asn#<'a> {
344 /// The autonomous system number for the IP address.
345 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
346 pub autonomous_system_numberrust-analyzer cargo maxminddb 0.30.0 geoip2/Asn#autonomous_system_number.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
347 /// The organization associated with the registered ASN.
348 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(skip_serializing_if = "Option::is_none")]
349 pub autonomous_system_organizationrust-analyzer cargo maxminddb 0.30.0 geoip2/Asn#autonomous_system_organization.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
350 }
351
352 /// Country/City database model structs.
353 ///
354 /// These structs are used by both [`crate::geoip2::Country`] and
355 /// [`crate::geoip2::City`] records.
356 pub mod countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/ {
357 use superrust-analyzer cargo maxminddb 0.30.0 geoip2/::Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#;
358 use serderust-analyzer cargo serde 1.0.229 crate/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize#};
359
360 /// Continent data for an IP address.
361 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
362 pub struct Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#<'a> {
363 /// Two-character continent code (e.g., "NA" for North America, "EU" for Europe).
364 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
365 pub coderust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
366 /// GeoNames ID for the continent.
367 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
368 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
369 /// Localized continent names.
370 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
371 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
372 }
373
374 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#<'_>);
375
376 /// Country data for an IP address.
377 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
378 pub struct Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'a> {
379 /// GeoNames ID for the country.
380 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
381 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
382 /// True if the country is a member state of the European Union.
383 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
384 pub is_in_european_unionrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#is_in_european_union.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
385 /// Two-character ISO 3166-1 alpha-2 country code.
386 /// See <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>.
387 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
388 pub iso_coderust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#iso_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
389 /// Localized country names.
390 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
391 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
392 }
393
394 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#<'_>);
395
396 /// Represented country data.
397 ///
398 /// The represented country is the country represented by something like a
399 /// military base or embassy.
400 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
401 pub struct RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#<'a> {
402 /// GeoNames ID for the represented country.
403 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
404 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
405 /// True if the represented country is a member state of the European Union.
406 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
407 pub is_in_european_unionrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#is_in_european_union.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
408 /// Two-character ISO 3166-1 alpha-2 country code.
409 /// See <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>.
410 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
411 pub iso_coderust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#iso_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
412 /// Localized country names.
413 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
414 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
415 /// Type of entity representing the country (e.g., "military").
416 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(rename = "type", default, skip_serializing_if = "Option::is_none")]
417 pub representation_typerust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#representation_type.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
418 }
419
420 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#<'_>);
421
422 /// Traits data for Country/City records.
423 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
424 pub struct Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits# {
425 /// True if the IP belongs to an anycast network.
426 /// See <https://en.wikipedia.org/wiki/Anycast>.
427 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
428 pub is_anycastrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits#is_anycast.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
429 }
430
431 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits#);
432 }
433
434 /// City database model structs.
435 ///
436 /// City-specific structs. Country-level structs are re-exported from
437 /// [`crate::geoip2::country`].
438 pub mod cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/ {
439 use superrust-analyzer cargo maxminddb 0.30.0 geoip2/::Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#;
440 use serderust-analyzer cargo serde 1.0.229 crate/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize#};
441
442 pub use superrust-analyzer cargo maxminddb 0.30.0 geoip2/::countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::{Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#, Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Country#, RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#, Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Traits#};
443
444 /// City data for an IP address.
445 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
446 pub struct Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/City#<'a> {
447 /// GeoNames ID for the city.
448 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
449 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/city/City#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
450 /// Localized city names.
451 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
452 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/city/City#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
453 }
454
455 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/city/City#<'_>);
456
457 /// Location data for an IP address.
458 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
459 pub struct Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#<'a> {
460 /// Approximate accuracy radius in kilometers around the coordinates.
461 /// This is the radius where we have a 67% confidence that the device
462 /// using the IP address resides within.
463 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
464 pub accuracy_radiusrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#accuracy_radius.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>,
465 /// Approximate latitude of the location. This value is not precise and
466 /// should not be used to identify a particular address or household.
467 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
468 pub latituderust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#latitude.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f64>,
469 /// Approximate longitude of the location. This value is not precise and
470 /// should not be used to identify a particular address or household.
471 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
472 pub longituderust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#longitude.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f64>,
473 /// Metro code for the location, used for targeting advertisements.
474 ///
475 /// **Deprecated:** Metro codes are no longer maintained and should not be used.
476 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
477 pub metro_coderust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#metro_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>,
478 /// Time zone associated with the location, as specified by the
479 /// IANA Time Zone Database (e.g., "America/New_York").
480 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
481 pub time_zonerust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#time_zone.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
482 }
483
484 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Location#<'_>);
485
486 /// Postal data for an IP address.
487 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
488 pub struct Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Postal#<'a> {
489 /// Postal code for the location. Not available for all countries.
490 /// In some countries, this will only contain part of the postal code.
491 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
492 pub coderust-analyzer cargo maxminddb 0.30.0 geoip2/city/Postal#code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
493 }
494
495 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Postal#<'_>);
496
497 /// Subdivision (state, province, etc.) data for an IP address.
498 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
499 pub struct Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#<'a> {
500 /// GeoNames ID for the subdivision.
501 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
502 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
503 /// ISO 3166-2 subdivision code (up to 3 characters).
504 /// See <https://en.wikipedia.org/wiki/ISO_3166-2>.
505 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
506 pub iso_coderust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#iso_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
507 /// Localized subdivision names.
508 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
509 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
510 }
511
512 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/city/Subdivision#<'_>);
513 }
514
515 /// Enterprise database model structs.
516 ///
517 /// Enterprise-specific structs with confidence scores. Some structs are
518 /// re-exported from [`crate::geoip2::country`].
519 pub mod enterpriserust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/ {
520 use superrust-analyzer cargo maxminddb 0.30.0 geoip2/::Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#;
521 use serderust-analyzer cargo serde 1.0.229 crate/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.229 ser/Serialize#};
522
523 pub use superrust-analyzer cargo maxminddb 0.30.0 geoip2/::countryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/::{Continentrust-analyzer cargo maxminddb 0.30.0 geoip2/country/Continent#, RepresentedCountryrust-analyzer cargo maxminddb 0.30.0 geoip2/country/RepresentedCountry#};
524
525 /// City data with confidence score.
526 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
527 pub struct Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#<'a> {
528 /// Confidence score (0-100) indicating MaxMind's certainty that the
529 /// city is correct.
530 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
531 pub confidencerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#confidence.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u8>,
532 /// GeoNames ID for the city.
533 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
534 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
535 /// Localized city names.
536 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
537 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
538 }
539
540 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Cityrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/City#<'_>);
541
542 /// Country data with confidence score.
543 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
544 pub struct Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#<'a> {
545 /// Confidence score (0-100) indicating MaxMind's certainty that the
546 /// country is correct.
547 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
548 pub confidencerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#confidence.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u8>,
549 /// GeoNames ID for the country.
550 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
551 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
552 /// True if the country is a member state of the European Union.
553 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
554 pub is_in_european_unionrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#is_in_european_union.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
555 /// Two-character ISO 3166-1 alpha-2 country code.
556 /// See <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>.
557 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
558 pub iso_coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#iso_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
559 /// Localized country names.
560 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
561 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
562 }
563
564 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Countryrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Country#<'_>);
565
566 /// Location data for an IP address.
567 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
568 pub struct Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#<'a> {
569 /// Approximate accuracy radius in kilometers around the coordinates.
570 /// This is the radius where we have a 67% confidence that the device
571 /// using the IP address resides within.
572 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
573 pub accuracy_radiusrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#accuracy_radius.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>,
574 /// Approximate latitude of the location. This value is not precise and
575 /// should not be used to identify a particular address or household.
576 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
577 pub latituderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#latitude.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f64>,
578 /// Approximate longitude of the location. This value is not precise and
579 /// should not be used to identify a particular address or household.
580 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
581 pub longituderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#longitude.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f64>,
582 /// Metro code for the location, used for targeting advertisements.
583 ///
584 /// **Deprecated:** Metro codes are no longer maintained and should not be used.
585 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
586 pub metro_coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#metro_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>,
587 /// Time zone associated with the location, as specified by the
588 /// IANA Time Zone Database (e.g., "America/New_York").
589 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
590 pub time_zonerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#time_zone.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
591 }
592
593 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Locationrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Location#<'_>);
594
595 /// Postal data with confidence score.
596 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
597 pub struct Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Postal#<'a> {
598 /// Postal code for the location. Not available for all countries.
599 /// In some countries, this will only contain part of the postal code.
600 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
601 pub coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Postal#code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
602 /// Confidence score (0-100) indicating MaxMind's certainty that the
603 /// postal code is correct.
604 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
605 pub confidencerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Postal#confidence.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u8>,
606 }
607
608 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Postalrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Postal#<'_>);
609
610 /// Subdivision data with confidence score.
611 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
612 pub struct Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#<'a> {
613 /// Confidence score (0-100) indicating MaxMind's certainty that the
614 /// subdivision is correct.
615 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
616 pub confidencerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#confidence.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u8>,
617 /// GeoNames ID for the subdivision.
618 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
619 pub geoname_idrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#geoname_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
620 /// ISO 3166-2 subdivision code (up to 3 characters).
621 /// See <https://en.wikipedia.org/wiki/ISO_3166-2>.
622 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
623 pub iso_coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#iso_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
624 /// Localized subdivision names.
625 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(borrow, default, skip_serializing_if = "Names::is_empty")]
626 pub namesrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#names.: Namesrust-analyzer cargo maxminddb 0.30.0 geoip2/Names#<'a>,
627 }
628
629 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Subdivisionrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Subdivision#<'_>);
630
631 /// Extended traits data for Enterprise records.
632 ///
633 /// Contains ISP, organization, connection type, and anonymity information.
634 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
635 pub struct Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#<'a> {
636 /// The autonomous system number (ASN) for the IP address.
637 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
638 pub autonomous_system_numberrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#autonomous_system_number.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32>,
639 /// The organization associated with the registered ASN.
640 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
641 pub autonomous_system_organizationrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#autonomous_system_organization.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
642 /// The connection type. Possible values include "Dialup", "Cable/DSL",
643 /// "Corporate", "Cellular", and "Satellite".
644 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
645 pub connection_typerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#connection_type.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
646 /// The second-level domain associated with the IP address
647 /// (e.g., "example.com").
648 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
649 pub domainrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#domain.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
650 /// True if the IP belongs to any sort of anonymous network.
651 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
652 pub is_anonymousrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_anonymous.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
653 /// True if the IP is registered to an anonymous VPN provider.
654 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
655 pub is_anonymous_vpnrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_anonymous_vpn.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
656 /// True if the IP belongs to an anycast network.
657 /// See <https://en.wikipedia.org/wiki/Anycast>.
658 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
659 pub is_anycastrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_anycast.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
660 /// True if the IP belongs to a hosting or VPN provider.
661 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
662 pub is_hosting_providerrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_hosting_provider.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
663 /// The name of the ISP associated with the IP address.
664 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
665 pub isprust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#isp.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
666 /// True if the IP belongs to a public proxy.
667 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
668 pub is_public_proxyrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_public_proxy.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
669 /// True if the IP is on a suspected anonymizing network and belongs to
670 /// a residential ISP.
671 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
672 pub is_residential_proxyrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_residential_proxy.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
673 /// True if the IP is a Tor exit node.
674 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
675 pub is_tor_exit_noderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#is_tor_exit_node.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<bool>,
676 /// The mobile country code (MCC) associated with the IP.
677 /// See <https://en.wikipedia.org/wiki/Mobile_country_code>.
678 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
679 pub mobile_country_coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#mobile_country_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
680 /// The mobile network code (MNC) associated with the IP.
681 /// See <https://en.wikipedia.org/wiki/Mobile_network_code>.
682 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
683 pub mobile_network_coderust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#mobile_network_code.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
684 /// The name of the organization associated with the IP address.
685 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
686 pub organizationrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#organization.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
687 /// The user type associated with the IP address. Possible values include
688 /// "business", "cafe", "cellular", "college", "government", "hosting",
689 /// "library", "military", "residential", "router", "school",
690 /// "search_engine_spider", and "traveler".
691 #[serderust-analyzer cargo serde_derive 1.0.229 serde:(default, skip_serializing_if = "Option::is_none")]
692 pub user_typerust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#user_type.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
693 }
694
695 impl_is_empty_via_defaultrust-analyzer cargo maxminddb 0.30.0 geoip2/impl_is_empty_via_default!!(Traitsrust-analyzer cargo maxminddb 0.30.0 geoip2/enterprise/Traits#<'_>);
696 }