netip 0.2.0

IPv4/IPv6 network types with non-contiguous masks support
Documentation
  • Coverage
  • 100%
    23 out of 23 items documented3 out of 3 items with examples
  • Size
  • Source code size: 161.17 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 9.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 15s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • yanet-platform/netip
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 3Hren

netip

A Rust library for working with IP networks and MAC addresses.

Key feature: support for non-contiguous subnet masks, e.g. 192.168.0.0/255.255.0.255.

Zero runtime dependencies. Rust edition 2024.

Types

Type Description
Ipv4Network IPv4 network: (address, mask) pair, supports non-contiguous masks
Ipv6Network IPv6 network: (address, mask) pair, supports non-contiguous masks
IpNetwork Enum over Ipv4Network / Ipv6Network
Contiguous<T> Newtype wrapper that enforces contiguous masks at parse time
MacAddr MAC address (EUI-48), stored as the lower 48 bits of a u64

Build and test

cargo build
cargo clippy
cargo test
cargo bench