pub trait TcpDualStackContext<I: DualStackIpExt, D: WeakDeviceIdentifier, BT: TcpBindingsTypes> {
type DualStackIpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + TransportIpContext<I::OtherVersion, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I::OtherVersion, BT> + TcpCoreTimerContext<I::OtherVersion, D, BT> + CounterContext<TcpCounters<I>>;
// Required methods
fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>;
fn dual_stack_enabled(&self, ip_options: &I::DualStackIpOptions) -> bool;
fn set_dual_stack_enabled(
&self,
ip_options: &mut I::DualStackIpOptions,
value: bool,
);
fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>(
&mut self,
cb: F,
) -> O;
// Provided methods
fn into_other_demux_socket_id(
&self,
id: TcpSocketId<I, D, BT>,
) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT> { ... }
fn dual_stack_demux_id(
&self,
id: TcpSocketId<I, D, BT>,
) -> DualStackTuple<I, DemuxSocketId<I, D, BT>> { ... }
}
Expand description
A provider of dualstack socket functionality required by TCP sockets.
Required Associated Types§
Sourcetype DualStackIpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + TransportIpContext<I::OtherVersion, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I::OtherVersion, BT> + TcpCoreTimerContext<I::OtherVersion, D, BT> + CounterContext<TcpCounters<I>>
type DualStackIpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + TransportIpContext<I::OtherVersion, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I::OtherVersion, BT> + TcpCoreTimerContext<I::OtherVersion, D, BT> + CounterContext<TcpCounters<I>>
The inner IP transport context,
Required Methods§
Sourcefn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>
fn other_demux_id_converter(&self) -> impl DualStackDemuxIdConverter<I>
Gets a converter to get the demux socket ID for the other stack.
Sourcefn dual_stack_enabled(&self, ip_options: &I::DualStackIpOptions) -> bool
fn dual_stack_enabled(&self, ip_options: &I::DualStackIpOptions) -> bool
Gets the enabled state of dual stack operations on the given socket.
Sourcefn set_dual_stack_enabled(
&self,
ip_options: &mut I::DualStackIpOptions,
value: bool,
)
fn set_dual_stack_enabled( &self, ip_options: &mut I::DualStackIpOptions, value: bool, )
Sets the enabled state of dual stack operations on the given socket.
Sourcefn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>(
&mut self,
cb: F,
) -> O
fn with_both_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>, &mut DemuxState<I::OtherVersion, D, BT>) -> O>( &mut self, cb: F, ) -> O
Calls cb
with mutable access to both demux states.
Provided Methods§
Sourcefn into_other_demux_socket_id(
&self,
id: TcpSocketId<I, D, BT>,
) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>
fn into_other_demux_socket_id( &self, id: TcpSocketId<I, D, BT>, ) -> <I::OtherVersion as DualStackBaseIpExt>::DemuxSocketId<D, BT>
Turns a TcpSocketId
into the demuxer ID of the other stack.
Sourcefn dual_stack_demux_id(
&self,
id: TcpSocketId<I, D, BT>,
) -> DualStackTuple<I, DemuxSocketId<I, D, BT>>
fn dual_stack_demux_id( &self, id: TcpSocketId<I, D, BT>, ) -> DualStackTuple<I, DemuxSocketId<I, D, BT>>
Returns a dual stack tuple with both demux identifiers for id
.
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.