Skip to main content

MmdbRecord

Derive Macro MmdbRecord 

Source
#[derive(MmdbRecord)]
{
    // Attributes available to this derive:
    #[mmdb]
}
Expand description

Derives the network key for one-object writer insertion.

Mark exactly one IpNetwork field with #[mmdb(network)]; that field is excluded from the encoded payload when paired with MmdbEncode.

§Examples

ⓘ
use libmaxminddb_rs::{IpNetwork, MmdbEncode, MmdbRecord};
#[derive(MmdbEncode, MmdbRecord)]
struct Record { #[mmdb(network)] network: IpNetwork, asn: u32 }