pub trait IpAddrWitness:
Witness<IpAddr>
+ Into<IpAddr<Self::V4, Self::V6>>
+ Copy {
type V4: Witness<Ipv4Addr> + Into<Self> + Copy;
type V6: Witness<Ipv6Addr> + Into<Self> + Copy;
// Provided methods
fn from_v4(addr: Self::V4) -> Self { ... }
fn from_v6(addr: Self::V6) -> Self { ... }
}Expand description
A type which is a witness to some property about an IpAddress.
IpAddrWitness extends Witness of IpAddr by adding associated types
for the IPv4- and IPv6-specific versions of the same witness type. For
example, the following implementation is provided for
SpecifiedAddr<IpAddr>:
ⓘ
impl IpAddrWitness for SpecifiedAddr<IpAddr> {
type V4 = SpecifiedAddr<Ipv4Addr>;
type V6 = SpecifiedAddr<Ipv6Addr>;
}Required Associated Types§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".