cidr

Trait Address

source
pub trait Address:
    Copy
    + Debug
    + Ord
    + Hash
    + PrivUnspecAddress {
    type Inet: Inet<Address = Self>;
    type Cidr: Cidr<Address = Self>;
    type InetPair: InetPair<Address = Self>;
}
Expand description

Maps IP address type to other types based on this address type

Implemented for IPv4Addr, IPv6Addr and IpAddr.

Required Associated Types§

source

type Inet: Inet<Address = Self>

Corresponding Inet type (representing an address + a network containing it)

source

type Cidr: Cidr<Address = Self>

Corresponding Cidr type (representing only a network, not a specific address within)

source

type InetPair: InetPair<Address = Self>

Corresponding InetPair type (representing two addresses in the same network)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Address for IpAddr

source§

impl Address for Ipv4Addr

source§

impl Address for Ipv6Addr

Implementors§