| Crates.io | netgauze-iana |
| lib.rs | netgauze-iana |
| version | 0.7.0 |
| created_at | 2023-03-05 11:10:24.582182+00 |
| updated_at | 2025-07-15 10:18:47.532459+00 |
| description | Collection of generic Internet Naming Authority (IANA) definitions that are not specific to a single protocol. |
| homepage | https://github.com/NetGauze/NetGauze |
| repository | https://github.com/NetGauze/NetGauze |
| max_upload_size | |
| id | 801228 |
| size | 56,769 |
Collection of generic IANA definitions that are not specific to a single protocol.
pub enum AddressFamily or pub enum SubsequentAddressFamily located
at src/address_family.rs.CamelCase convention for address families.Since not all AddressFamily and SubsequentAddressFamily are valid combinations, we introduce an
enum pub enum AddressType that defines a set of valid combination to ensure only
valid AFI/SAFI are used at compile time.
pub enum AddressType located at src/address_family.rs.{$AddressFamily}{$SubsequentAddressFamily}.impl AddressType adjust pub const fn address_family and pub const fn subsequent_address_family to return the
correct AddressFamily and $SubsequentAddressFamily for the new type. If not, the compiler will throw an error.impl AddressType adjust from_afi_safi to return the newly defined {$AddressFamily}{$SubsequentAddressFamily}
for the given AFI and SAFI.test_address_type_check_ret_afi_safi and test_address_type_try_from.