pub enum DataValue {
}Expand description
Data value that can be stored in the data section
This enum represents all MMDB data types and can be used for both standalone .pgb files and MMDB-embedded data.
Note: Pointer is excluded from JSON serialization/deserialization as it’s
an internal MMDB format detail (data section offset), not a user-facing type.
Variants§
Pointer(u32)
Pointer to another data item (offset) - internal use only, not for JSON
String(String)
UTF-8 string
Double(f64)
IEEE 754 double precision float
Bytes(Vec<u8>)
Raw byte array
Uint16(u16)
Unsigned 16-bit integer
Uint32(u32)
Unsigned 32-bit integer
Map(HashMap<String, Self>)
Key-value map (string keys only per MMDB spec)
Int32(i32)
Signed 32-bit integer
Uint64(u64)
Unsigned 64-bit integer
Uint128(u128)
Unsigned 128-bit integer
Array(Vec<Self>)
Array of values
Bool(bool)
Boolean value
Float(f32)
IEEE 754 single precision float
Timestamp(i64)
Unix timestamp (seconds since 1970-01-01 00:00:00 UTC)
Stored compactly as a variable-length i64 using Matchy extended type 128. Serializes to/from ISO 8601 strings (e.g., “2025-10-02T18:44:31Z”) in JSON, making the optimization transparent to API consumers.
This is a Matchy extension to the MMDB format. Standard MMDB readers will not recognize this type.