Registry / networking / ip-network

ip-network

JSON →
library0.4.1rscratesunverified

IPv4 and IPv6 network structs for representing and manipulating CIDR networks.

# Cargo.toml [dependencies] ip_network = "0.4.1"
INSTALL
IMPORT
SIG · IP-NETWORK
I
ip-network
networkingrustv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IpNetwork
use ip_network::IpNetwork;

Parses a CIDR string and prints the network address and prefix length.

use ip_network::IpNetwork; fn main() -> Result<(), ip_network::IpNetworkError> { let network: IpNetwork = "192.168.1.0/24".parse()?; println!("Network: {}, prefix length: {}", network.network_address(), network.prefix_length()); Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
ip-network — cargo add ip-network · libregistry