#numbers #system #autonomous #no-alloc

no-std asn

Newtype for Autonomous System Number (ASN)

2 unstable releases

0.2.0 Oct 28, 2024
0.1.0 Oct 28, 2024

#1055 in Parser implementations

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