#[non_exhaustive]pub enum MaxMindError {
Io {
database: MaxMindDatabase,
path: PathBuf,
source: Error,
},
Invalid {
database: MaxMindDatabase,
source: Box<dyn Error + Send + Sync + 'static>,
},
WrongDatabase {
database: MaxMindDatabase,
found: String,
},
}Available on crate feature
maxmind only.Expand description
Errors loading MaxMind databases.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
The database file could not be read.
Fields
§
database: MaxMindDatabaseWhich database.
Invalid
The bytes are not a valid MMDB file.
Fields
§
database: MaxMindDatabaseWhich database.
WrongDatabase
A valid database of the wrong kind, e.g. an ASN database passed as the country database.
Fields
§
database: MaxMindDatabaseWhich slot the database was passed for.
Trait Implementations§
Source§impl Debug for MaxMindError
impl Debug for MaxMindError
Source§impl Display for MaxMindError
impl Display for MaxMindError
Source§impl Error for MaxMindError
impl Error for MaxMindError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for MaxMindError
impl !UnwindSafe for MaxMindError
impl Freeze for MaxMindError
impl Send for MaxMindError
impl Sync for MaxMindError
impl Unpin for MaxMindError
impl UnsafeUnpin for MaxMindError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more