pub enum Value {
}Expand description
A MaxMind DB value.
This is a fully owned representation. When reading, prefer deserializing
into a borrowed type (for example the structs in crate::geoip2) to avoid
copying strings and byte arrays out of the database.
Value::Pointer is only meaningful while encoding: the numeric value is a
raw data-section pointer. Use it only if you are building pointer-based
databases by hand.
Variants§
Pointer(u32)
String(String)
Float64(f64)
Bytes(Vec<u8>)
Uint16(u16)
Uint32(u32)
Int32(i32)
Map(BTreeMap<String, Value>)
Uint64(u64)
Uint128(u128)
Slice(Vec<Value>)
Bool(bool)
Float32(f32)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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