pub trait DualStackDatagramSpecBoundStateContext<I: IpExt, CC: DeviceIdContext<AnyDevice>, BC: DatagramBindingsTypes>: DatagramSocketSpec {
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + CoreTxMetadataContext<TxMetadata<I, CC::WeakDeviceId, Self>, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId> + TransportIpContext<I::OtherVersion, BC> + CoreTxMetadataContext<TxMetadata<I::OtherVersion, CC::WeakDeviceId, Self>, BC>;
// Required methods
fn dual_stack_enabled(
core_ctx: &CC,
ip_options: &IpOptions<I, CC::WeakDeviceId, Self>,
) -> bool;
fn to_other_socket_options<'a>(
core_ctx: &CC,
state: &'a IpOptions<I, CC::WeakDeviceId, Self>,
) -> &'a DatagramIpSpecificSocketOptions<I::OtherVersion, CC::WeakDeviceId>;
fn ds_converter(
core_ctx: &CC,
) -> impl DualStackConverter<I, CC::WeakDeviceId, Self>;
fn to_other_bound_socket_id(
core_ctx: &CC,
id: &Self::SocketId<I, CC::WeakDeviceId>,
) -> <Self::SocketMapSpec<I::OtherVersion, CC::WeakDeviceId> as DatagramSocketMapSpec<I::OtherVersion, CC::WeakDeviceId, Self::AddrSpec>>::BoundSocketId;
fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundDatagramSocketMap<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>, &mut BoundDatagramSocketMap<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundDatagramSocketMap<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
}Expand description
A mirror trait of DualStackDatagramBoundStateContext allowing foreign
crates to provide blanket impls for it.
This trait repeats all the definitions in
DualStackDatagramBoundStateContext to provide blanket impls from an
implementation on the type implementing DatagramSocketSpec, which is
local for foreign implementers.
See DualStackDatagramBoundStateContext for details.
Required Associated Types§
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + CoreTxMetadataContext<TxMetadata<I, CC::WeakDeviceId, Self>, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId> + TransportIpContext<I::OtherVersion, BC> + CoreTxMetadataContext<TxMetadata<I::OtherVersion, CC::WeakDeviceId, Self>, BC>
Required Methods§
fn dual_stack_enabled( core_ctx: &CC, ip_options: &IpOptions<I, CC::WeakDeviceId, Self>, ) -> bool
fn to_other_socket_options<'a>( core_ctx: &CC, state: &'a IpOptions<I, CC::WeakDeviceId, Self>, ) -> &'a DatagramIpSpecificSocketOptions<I::OtherVersion, CC::WeakDeviceId>
fn ds_converter( core_ctx: &CC, ) -> impl DualStackConverter<I, CC::WeakDeviceId, Self>
fn to_other_bound_socket_id( core_ctx: &CC, id: &Self::SocketId<I, CC::WeakDeviceId>, ) -> <Self::SocketMapSpec<I::OtherVersion, CC::WeakDeviceId> as DatagramSocketMapSpec<I::OtherVersion, CC::WeakDeviceId, Self::AddrSpec>>::BoundSocketId
fn with_both_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundDatagramSocketMap<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>, &mut BoundDatagramSocketMap<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, cb: F, ) -> O
fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundDatagramSocketMap<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, cb: F, ) -> O
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( core_ctx: &mut CC, cb: F, ) -> O
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.