netstack3_tcp

Trait 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.

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