#numbers #system #autonomous #no-alloc

no-std asn

Newtype for Autonomous System Number (ASN)

2 unstable releases

new 0.2.0 Oct 28, 2024
0.1.0 Oct 28, 2024

#884 in Parser implementations

Download history 256/week @ 2024-10-27

256 downloads per month

MIT/Apache

12KB
189 lines

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);

No runtime deps