asdot 0.1.0

RFC 5396-compliant Autonomous System Number (ASN) parsing and formatting
Documentation
  • Coverage
  • 100%
    14 out of 14 items documented5 out of 8 items with examples
  • Size
  • Source code size: 14.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 453 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rcullito/asdot
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rcullito

asdot

RFC 5396-compliant Autonomous System Number (ASN) parsing and formatting in Rust.

Supports all three notation formats: ASPLAIN (65536), ASDOT (1.0), and ASDOT+ (0.1). Display defaults to ASDOT.

[dependencies]
asdot = "0.1"
use asdot::Asn;

let asn: Asn = "1.0".parse().unwrap();
assert_eq!(asn.value(), 65536);

assert_eq!(asn.to_string(), "1.0");      // ASDOT (default Display)
assert_eq!(asn.to_asplain(), "65536");   // ASPLAIN
assert_eq!(asn.to_asdot_plus(), "1.0"); // ASDOT+

License