net
Network helpers on std::net and plain text: no I/O, no resolution.
Install
Section titled “Install”Cargo feature net (enabled by default). To compile only this module:
or in Cargo.toml:
Import path: helpers4::net.
| Item | What it does |
|---|---|
is_public_ip | Returns true when ip is a globally reachable unicast address, false for everything that is loopback, private, link-local, shared, documentation, reserved or otherwise not on the public internet. |
is_valid_hostname | Checks that hostname is a valid hostname (RFC 1035 and RFC 1123, ASCII only). |
Error types
Section titled “Error types”Documented on the page of the helper that returns them.
| Type | Returned by |
|---|---|
HostnameError | is_valid_hostname |
