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§
Sourcetype IpAddrWitness: IpAddrWitness + From<Self>
type IpAddrWitness: IpAddrWitness + From<Self>
The type-erased version of Self.
For example, SpecifiedAddr<Ipv4Addr>: IpAddressWitness<IpAddrWitness = SpecifiedAddr<IpAddr>>.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.