#[non_exhaustive]pub enum FromCsvError {
AddrMismatch,
AddrOutOfOrder,
AddrParse(AddrParseError),
Csv(Error),
InvalidRecord,
}
Expand description
Errors that may arise when loading a DbIpDatabase
from CSV.
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.
AddrMismatch
An address range must start and end as either Ipv4 or Ipv6.
AddrOutOfOrder
Address ranges must be in ascending order. This will be raised if they aren’t.
AddrParse(AddrParseError)
Failed to parse an address.
Csv(Error)
CSV error.
InvalidRecord
CSV record was missing required data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FromCsvError
impl !RefUnwindSafe for FromCsvError
impl Send for FromCsvError
impl Sync for FromCsvError
impl Unpin for FromCsvError
impl !UnwindSafe for FromCsvError
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