pub type GeoIpError = MaxMindDbError;Expand description
An error in the GeoIpLookup.
Aliased Type§
pub enum GeoIpError {
InvalidDatabase {
message: String,
offset: Option<usize>,
},
Io(Error),
Mmap(Error),
Decoding {
message: String,
offset: Option<usize>,
path: Option<String>,
},
ResourceLimit {
message: String,
offset: Option<usize>,
path: Option<String>,
},
InvalidNetwork(IpNetworkError),
InvalidInput {
message: String,
},
}Variants§
InvalidDatabase
The database file is invalid or corrupted.
Fields
Io(Error)
An I/O error occurred while reading the database.
Mmap(Error)
Memory mapping failed.
Decoding
Error decoding data from the database.
Fields
ResourceLimit
Decoding or verification stopped because it exceeded an expansion or work safety limit.
This does not necessarily mean that the database is structurally
invalid. Schema-specific limits reported by a custom Serde visitor use
[MaxMindDbError::Decoding] instead. Applications may choose a narrower
schema or reject the database as untrusted input.
Fields
InvalidNetwork(IpNetworkError)
The provided network/CIDR is invalid.
InvalidInput
The provided input is invalid for this operation.