pub trait IpAddressWitness<A: IpAddress>: Witness<A> {
    type IpAddrWitness: IpAddrWitness + From<Self>;
}
Expand description

A type which is witness to some property about an IpAddress, A.

IpAddressWitness<A> extends Witness of the IpAddress type A by adding an associated type for the type-erased IpAddr version of the same witness type. For example, the following implementation is provided for SpecifiedAddr<A>:

impl<A: IpAddress> IpAddressWitness<A> for SpecifiedAddr<A> {
    type IpAddrWitness = SpecifiedAddr<IpAddr>;
}

Required Associated Types§

source

type IpAddrWitness: IpAddrWitness + From<Self>

The type-erased version of Self.

For example, SpecifiedAddr<Ipv4Addr>: IpAddressWitness<IpAddrWitness = SpecifiedAddr<IpAddr>>.

Object Safety§

This trait is not object safe.

Implementors§