netstack3_ip::gmp

Trait MldContext

Source
pub trait MldContext<BT: MldBindingsTypes>: DeviceIdContext<AnyDevice> + MldContextMarker {
    type SendContext<'a>: MldSendContext<BT, DeviceId = Self::DeviceId> + 'a;

    // Required method
    fn with_mld_state_mut<O, F: FnOnce(Self::SendContext<'_>, GmpStateRef<'_, Ipv6, Self, BT>) -> O>(
        &mut self,
        device: &Self::DeviceId,
        cb: F,
    ) -> O;
}
Expand description

The execution context for the Multicast Listener Discovery (MLD) protocol.

Required Associated Types§

Source

type SendContext<'a>: MldSendContext<BT, DeviceId = Self::DeviceId> + 'a

The inner context given to with_mld_state_mut.

Required Methods§

Source

fn with_mld_state_mut<O, F: FnOnce(Self::SendContext<'_>, GmpStateRef<'_, Ipv6, Self, BT>) -> O>( &mut self, device: &Self::DeviceId, cb: F, ) -> O

Calls the function with a mutable reference to the device’s MLD state and whether or not MLD is enabled for the device.

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.

Implementors§