pub trait DualStackDatagramSpecBoundStateContext<I: IpExt, CC: DeviceIdContext<AnyDevice>, BC>: DatagramSocketSpec {
    type IpSocketsCtx<'a>: TransportIpContext<I, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId> + TransportIpContext<I::OtherVersion, BC>;

    // Required methods
    fn dual_stack_enabled(
        core_ctx: &CC,
        state: &impl AsRef<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 BoundSockets<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>, &mut BoundSockets<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>(
        core_ctx: &mut CC,
        cb: F,
    ) -> O;
    fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> 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§

source

type IpSocketsCtx<'a>: TransportIpContext<I, BC> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId> + TransportIpContext<I::OtherVersion, BC>

Required Methods§

source

fn dual_stack_enabled( core_ctx: &CC, state: &impl AsRef<IpOptions<I, CC::WeakDeviceId, Self>>, ) -> bool

source

fn to_other_socket_options<'a>( core_ctx: &CC, state: &'a IpOptions<I, CC::WeakDeviceId, Self>, ) -> &'a DatagramIpSpecificSocketOptions<I::OtherVersion, CC::WeakDeviceId>

source

fn ds_converter( core_ctx: &CC, ) -> impl DualStackConverter<I, CC::WeakDeviceId, Self>

source

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

source

fn with_both_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>>, &mut BoundSockets<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>( core_ctx: &mut CC, cb: F, ) -> O

source

fn with_other_bound_sockets_mut<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>, &mut BoundSockets<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId, <Self as DatagramSocketSpec>::AddrSpec, <Self as DatagramSocketSpec>::SocketMapSpec<I::OtherVersion, <CC as DeviceIdContext<AnyDevice>>::WeakDeviceId>>) -> O>( core_ctx: &mut CC, cb: F, ) -> O

source

fn with_transport_context<O, F: FnOnce(&mut Self::IpSocketsCtx<'_>) -> O>( core_ctx: &mut CC, cb: F, ) -> O

Object Safety§

This trait is not object safe.

Implementors§