pub trait IpDeviceConfigurationContext<I: IpDeviceIpExt, BC: IpDeviceBindingsContext<I, Self::DeviceId>>: IpDeviceStateContext<I, BC> + IpDeviceMtuContext<I> + DeviceIdContext<AnyDevice> {
    type DevicesIter<'s>: Iterator<Item = Self::DeviceId> + 's;
    type WithIpDeviceConfigurationInnerCtx<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId, AddressId = Self::AddressId> + GmpHandler<I, BC> + NudIpHandler<I, BC> + DadHandler<I, BC> + IpAddressRemovalHandler<I, BC> + IpDeviceMtuContext<I> + 's;
    type WithIpDeviceConfigurationMutInner<'s>: WithIpDeviceConfigurationMutInner<I, BC, DeviceId = Self::DeviceId> + 's;
    type DeviceAddressAndGroupsAccessor<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId> + GmpQueryHandler<I, BC> + 's;

    // Required methods
    fn with_ip_device_configuration<O, F: FnOnce(&I::Configuration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
    fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
    fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>(
        &mut self,
        cb: F,
    ) -> O;
    fn loopback_id(&mut self) -> Option<Self::DeviceId>;
}
Expand description

The execution context for IP devices.

Required Associated Types§

source

type DevicesIter<'s>: Iterator<Item = Self::DeviceId> + 's

The iterator provided by this context.

source

type WithIpDeviceConfigurationInnerCtx<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId, AddressId = Self::AddressId> + GmpHandler<I, BC> + NudIpHandler<I, BC> + DadHandler<I, BC> + IpAddressRemovalHandler<I, BC> + IpDeviceMtuContext<I> + 's

The inner configuration context.

source

type WithIpDeviceConfigurationMutInner<'s>: WithIpDeviceConfigurationMutInner<I, BC, DeviceId = Self::DeviceId> + 's

The inner mutable configuration context.

source

type DeviceAddressAndGroupsAccessor<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId> + GmpQueryHandler<I, BC> + 's

Provides access to device state.

Required Methods§

source

fn with_ip_device_configuration<O, F: FnOnce(&I::Configuration, Self::WithIpDeviceConfigurationInnerCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with an immutable reference to the IP device configuration and a WithIpDeviceConfigurationInnerCtx.

source

fn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with a WithIpDeviceConfigurationMutInner.

source

fn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>( &mut self, cb: F, ) -> O

Calls the function with an Iterator of IDs for all initialized devices and an accessor for device state.

source

fn loopback_id(&mut self) -> Option<Self::DeviceId>

Returns the ID of the loopback interface, if one exists on the system and is initialized.

Object Safety§

This trait is not object safe.

Implementors§