Trait ip::traits::Afi

source ·
pub trait Afi: Copy + Debug + Hash + Ord + 'static {
    type Octets: Octets;
    type Primitive: Address<Self> + AddressDisplay<Self>;

    // Required method
    fn as_afi() -> Afi;
}
Expand description

An interface for describing an IP address family.

Required Associated Types§

source

type Octets: Octets

The big-endian byte array representation of addresses of this address family.

source

type Primitive: Address<Self> + AddressDisplay<Self>

The primitive integer type used to store address values of this address family.

Required Methods§

source

fn as_afi() -> Afi

Get the concrete::Afi variant associated with Self.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Afi for Ipv4

§

type Octets = [u8; 4]

§

type Primitive = u32

source§

impl Afi for Ipv6

§

type Octets = [u8; 16]

§

type Primitive = u128