| Crates.io | asn |
| lib.rs | asn |
| version | 0.2.0 |
| created_at | 2024-10-28 20:24:30.525522+00 |
| updated_at | 2024-10-28 21:05:52.15829+00 |
| description | Newtype for Autonomous System Number (ASN) |
| homepage | |
| repository | https://github.com/robo9k/asn-rs |
| max_upload_size | |
| id | 1426049 |
| size | 11,998 |
Newtype for Autonomous System Number (ASN)
use asn::Asn;
let asn = Asn::new(0);
assert_eq!(asn, Asn::ZERO);
let asn = Asn::from_str("4294967295").expect("valid const last 32-bit ASN");
assert_eq!(asn, Asn::LAST4);