pub trait DualStackBoundStateContext<I: IpExt, BC: UdpBindingsContext<I, Self::DeviceId>>: DeviceIdContext<AnyDevice> {
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CoreTxMetadataContext<UdpSocketTxMetadata<I, Self::WeakDeviceId, BC>, BC> + TransportIpContext<I::OtherVersion, BC> + CoreTxMetadataContext<UdpSocketTxMetadata<I::OtherVersion, Self::WeakDeviceId, BC>, BC>;
// Required methods
fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O;
fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O;
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O;
}Expand description
An execution context for UDP dual-stack operations.
Required Associated Types§
Sourcetype IpSocketsCtx<'a>: TransportIpContext<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CoreTxMetadataContext<UdpSocketTxMetadata<I, Self::WeakDeviceId, BC>, BC> + TransportIpContext<I::OtherVersion, BC> + CoreTxMetadataContext<UdpSocketTxMetadata<I::OtherVersion, Self::WeakDeviceId, BC>, BC>
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + DeviceIdContext<AnyDevice, DeviceId = Self::DeviceId, WeakDeviceId = Self::WeakDeviceId> + CoreTxMetadataContext<UdpSocketTxMetadata<I, Self::WeakDeviceId, BC>, BC> + TransportIpContext<I::OtherVersion, BC> + CoreTxMetadataContext<UdpSocketTxMetadata<I::OtherVersion, Self::WeakDeviceId, BC>, BC>
The core context passed to the callbacks to methods.
Required Methods§
Sourcefn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, Self::WeakDeviceId, BC>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with mutable access to both the demultiplexing maps.
Sourcefn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>(
&mut self,
cb: F,
) -> O
fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I::OtherVersion, Self::WeakDeviceId, BC>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with mutable access to the demultiplexing map for the other IP version.
Sourcefn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
&mut self,
cb: F,
) -> O
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( &mut self, cb: F, ) -> O
Calls the provided callback with access to the IpSocketsCtx.
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.