GeoIpError

Type Alias GeoIpError 

Source
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>,
    },
    InvalidNetwork(IpNetworkError),
    InvalidInput {
        message: String,
    },
}

Variants§

§

InvalidDatabase

The database file is invalid or corrupted.

Fields

§message: String

Description of what is invalid.

§offset: Option<usize>

Byte offset in the database where the error was detected.

§

Io(Error)

An I/O error occurred while reading the database.

§

Mmap(Error)

Memory mapping failed.

§

Decoding

Error decoding data from the database.

Fields

§message: String

Description of the decoding error.

§offset: Option<usize>

Byte offset in the data section where the error occurred.

§path: Option<String>

JSON-pointer-like path to the field (e.g., “/city/names/en”).

§

InvalidNetwork(IpNetworkError)

The provided network/CIDR is invalid.

§

InvalidInput

The provided input is invalid for this operation.

Fields

§message: String

Description of what is invalid about the input.