pub trait DualStackDemuxIdConverter<I: DualStackIpExt>: 'static + Clone + Copy {
// Required method
fn convert<D: WeakDeviceIdentifier, BT: TcpBindingsTypes>(
&self,
id: TcpSocketId<I, D, BT>,
) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>;
}
Expand description
This trait allows us to work around the life-time issue when we need to convert an IPv6 socket ID into an IPv4 demux ID without holding on the a dual-stack CoreContext.
Required Methods§
sourcefn convert<D: WeakDeviceIdentifier, BT: TcpBindingsTypes>(
&self,
id: TcpSocketId<I, D, BT>,
) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>
fn convert<D: WeakDeviceIdentifier, BT: TcpBindingsTypes>( &self, id: TcpSocketId<I, D, BT>, ) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>
Turns a TcpSocketId
into the demuxer ID of the other stack.
Object Safety§
This trait is not object safe.