#[non_exhaustive]pub enum IpVersion {
V4,
V6,
}Expand description
Which IP version a database indexes.
A Writer defaults to IpVersion::V6, which stores IPv4 networks
inside the IPv4-in-IPv6 range (::/96) so a single database answers both IPv4 and IPv6
lookups. Choose IpVersion::V4 for a smaller, IPv4-only database that rejects IPv6
inserts.
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.
V4
A 32-bit tree. Only IPv4 networks may be inserted.
V6
A 128-bit tree. IPv4 networks are stored under ::/96. Default.
Trait Implementations§
impl Copy for IpVersion
impl Eq for IpVersion
impl StructuralPartialEq for IpVersion
Auto Trait Implementations§
impl Freeze for IpVersion
impl RefUnwindSafe for IpVersion
impl Send for IpVersion
impl Sync for IpVersion
impl Unpin for IpVersion
impl UnsafeUnpin for IpVersion
impl UnwindSafe for IpVersion
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