pub trait DatagramSpecBoundStateContext<I: IpExt + DualStackIpExt, CC: DeviceIdContext<AnyDevice>, BC>: DatagramSocketSpec {
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + MulticastMembershipHandler<I, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>;
type DualStackContext: DualStackDatagramBoundStateContext<I, BC, Self, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>;
type NonDualStackContext: NonDualStackDatagramBoundStateContext<I, BC, Self, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>;
// Required methods
fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
fn dual_stack_context(
core_ctx: &mut CC,
) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>;
fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>(
core_ctx: &mut CC,
cb: F,
) -> O;
}
Expand description
A mirror trait of DatagramBoundStateContext
allowing foreign crates to
provide blanket impls for it.
This trait repeats all the definitions in DatagramBoundStateContext
to
provide blanket impls from an implementation on the type implementing
DatagramSocketSpec
, which is local for foreign implementers.
See DatagramBoundStateContext
for details.
Required Associated Types§
type IpSocketsCtx<'a>: TransportIpContext<I, BC> + MulticastMembershipHandler<I, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>
type DualStackContext: DualStackDatagramBoundStateContext<I, BC, Self, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>
type NonDualStackContext: NonDualStackDatagramBoundStateContext<I, BC, Self, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>
Required Methods§
fn with_bound_sockets<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &BoundSockets<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>( core_ctx: &mut CC, cb: F, ) -> O
fn with_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>( core_ctx: &mut CC, cb: F, ) -> O
fn dual_stack_context( core_ctx: &mut CC, ) -> MaybeDualStack<&mut Self::DualStackContext, &mut Self::NonDualStackContext>
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.