hostname-validator 1.1.1

Validate hostnames according to IETF RFC 1123
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 4.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 496.03 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • pop-os/hostname-validator
    10 5 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mmstick jackpot51

hostname-validator

Rust crate for validating a hostname according to the IETF RFC 1123.

extern crate hostname_validator;

let valid = "VaLiD-HoStNaMe";
let invalid = "-invalid-name";

assert!(hostname_validator::is_valid(valid));
assert!(!hostname_validator::is_valid(invalid));