Skip to content

rcullito/asdot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asdot

github crates.io docs.rs

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

Licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages