2 releases

Uses new Rust 2024

new 0.0.1 Mar 12, 2025
0.0.0 Mar 12, 2025

#25 in #deserializing

Download history 139/week @ 2025-03-07

139 downloads per month

Custom license

5KB
51 lines

ipfilter

Crates Version

Example

use core::net::Ipv4Addr;
use std::fs::File;

fn main() {
	let file = File::open("whitelist.bin").unwrap();
	let whitelist = ipfilter::v4::read_from(&mut &file).unwrap();

	assert!(whitelist.contains(&Ipv4Addr::LOCALHOST));
}

lib.rs:

A library to streamline IP filtering. Supports creating, serializing, and deserializing [Ipv4Range] and [Ipv6Range] for optimized filtering.

Dependencies

~0.5–1.1MB
~25K SLoC