packet_formats::ip

Trait IpProtoExt

Source
pub trait IpProtoExt: Ip {
    type Proto: IpProtocol + GenericOverIp<Self, Type = Self::Proto> + GenericOverIp<Ipv4, Type = Ipv4Proto> + GenericOverIp<Ipv6, Type = Ipv6Proto> + Copy + Clone + Hash + Debug + Display + PartialEq + Eq + PartialOrd + Ord;
}
Expand description

An Ip extension trait adding an associated type for the IP protocol number.

Required Associated Types§

Source

type Proto: IpProtocol + GenericOverIp<Self, Type = Self::Proto> + GenericOverIp<Ipv4, Type = Ipv4Proto> + GenericOverIp<Ipv6, Type = Ipv6Proto> + Copy + Clone + Hash + Debug + Display + PartialEq + Eq + PartialOrd + Ord

The type representing an IPv4 or IPv6 protocol number.

For IPv4, this is Ipv4Proto, and for IPv6, this is Ipv6Proto.

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.

Implementations on Foreign Types§

Source§

impl IpProtoExt for Ipv4

Source§

impl IpProtoExt for Ipv6

Implementors§