pub trait DatagramSpecStateContext<I: IpExt, CC: DeviceIdContext<AnyDevice>, BC>: DatagramSocketSpec {
    type SocketsStateCtx<'a>: DatagramBoundStateContext<I, BC, Self> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>;

    // Required methods
    fn with_all_sockets_mut<O, F: FnOnce(&mut DatagramSocketSet<I, CC::WeakDeviceId, Self>) -> O>(
        core_ctx: &mut CC,
        cb: F,
    ) -> O;
    fn with_all_sockets<O, F: FnOnce(&DatagramSocketSet<I, CC::WeakDeviceId, Self>) -> O>(
        core_ctx: &mut CC,
        cb: F,
    ) -> O;
    fn with_socket_state<O, F: FnOnce(&mut Self::SocketsStateCtx<'_>, &SocketState<I, CC::WeakDeviceId, Self>) -> O>(
        core_ctx: &mut CC,
        id: &Self::SocketId<I, CC::WeakDeviceId>,
        cb: F,
    ) -> O;
    fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketsStateCtx<'_>, &mut SocketState<I, CC::WeakDeviceId, Self>) -> O>(
        core_ctx: &mut CC,
        id: &Self::SocketId<I, CC::WeakDeviceId>,
        cb: F,
    ) -> O;
    fn for_each_socket<F: FnMut(&mut Self::SocketsStateCtx<'_>, &Self::SocketId<I, CC::WeakDeviceId>, &SocketState<I, CC::WeakDeviceId, Self>)>(
        core_ctx: &mut CC,
        cb: F,
    );
}
Expand description

A mirror trait of DatagramStateContext allowing foreign crates to provide blanket impls for it.

This trait repeats all the definitions in DatagramStateContext to provide blanket impls from an implementation on the type implementing DatagramSocketSpec, which is local for foreign implementers.

See DatagramStateContext for details.

Required Associated Types§

source

type SocketsStateCtx<'a>: DatagramBoundStateContext<I, BC, Self> + DeviceIdContext<AnyDevice, DeviceId = CC::DeviceId, WeakDeviceId = CC::WeakDeviceId>

Required Methods§

source

fn with_all_sockets_mut<O, F: FnOnce(&mut DatagramSocketSet<I, CC::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, cb: F, ) -> O

source

fn with_all_sockets<O, F: FnOnce(&DatagramSocketSet<I, CC::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, cb: F, ) -> O

source

fn with_socket_state<O, F: FnOnce(&mut Self::SocketsStateCtx<'_>, &SocketState<I, CC::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, id: &Self::SocketId<I, CC::WeakDeviceId>, cb: F, ) -> O

source

fn with_socket_state_mut<O, F: FnOnce(&mut Self::SocketsStateCtx<'_>, &mut SocketState<I, CC::WeakDeviceId, Self>) -> O>( core_ctx: &mut CC, id: &Self::SocketId<I, CC::WeakDeviceId>, cb: F, ) -> O

source

fn for_each_socket<F: FnMut(&mut Self::SocketsStateCtx<'_>, &Self::SocketId<I, CC::WeakDeviceId>, &SocketState<I, CC::WeakDeviceId, Self>)>( core_ctx: &mut CC, cb: F, )

Object Safety§

This trait is not object safe.

Implementors§