Trait netstack3_tcp::DualStackDemuxIdConverter

source ·
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§

source

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.

Implementations on Foreign Types§

source§

impl<I: DualStackIpExt> DualStackDemuxIdConverter<I> for Uninstantiable

source§

fn convert<D: WeakDeviceIdentifier, BT: TcpBindingsTypes>( &self, _id: TcpSocketId<I, D, BT>, ) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>

Implementors§