ipnet-trie
IPv4 and IPv6 network fast lookup prefix trie.
Description
This crate provides storage and retrieval of IPv4 and IPv6 network prefixes.
Currently, it uses ipnet crate as IP network data structure and
prefix-trie as
backend,
that provides fast lookup times, and a small memory footprint.
Feature flags
export: enable export trie into bytes or to a writer and import from bytes or from a reader.
Usage
Add this to your Cargo.toml:
[]
= "2.8"
= "0.1"
and then you can use it like this:
use ;
use ;
use IpnetTrie;
let mut table = new;
let network = from;
let ip_address = new;
assert_eq!;
// Get value for network from table
assert_eq!;