pub trait DatagramSocketMapSpec<I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec>: SocketMapStateSpec<ListenerId = Self::BoundSocketId, ConnId = Self::BoundSocketId> + SocketMapConflictPolicy<ListenerAddr<ListenerIpAddr<I::Addr, A::LocalIdentifier>, D>, <Self as SocketMapStateSpec>::ListenerSharingState, I, D, A> + SocketMapConflictPolicy<ConnAddr<ConnIpAddr<I::Addr, A::LocalIdentifier, A::RemoteIdentifier>, D>, <Self as SocketMapStateSpec>::ConnSharingState, I, D, A> {
type BoundSocketId: Clone + Debug;
}
Expand description
Types and behavior for datagram socket demultiplexing map.
I: Ip
describes the type of packets that can be received by sockets in
the map.
Required Associated Types§
sourcetype BoundSocketId: Clone + Debug
type BoundSocketId: Clone + Debug
The type of IDs stored in a BoundSocketMap
for which this is the
specification.
This can be the same as DatagramSocketSpec::SocketId
but doesn’t
have to be. In the case of
dual-stack sockets, for example, an IPv4 socket will have type
DatagramSocketSpec::SocketId<Ipv4>
but the IPv4 demultiplexing map
might have BoundSocketId=Either<DatagramSocketSpec::SocketId<Ipv4>, DatagramSocketSpec::SocketId<Ipv6>>
to allow looking up IPv6 sockets
when receiving IPv4 packets.
Object Safety§
This trait is not object safe.