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§
sourcetype DevicesIter<'s>: Iterator<Item = Self::DeviceId> + 's
type DevicesIter<'s>: Iterator<Item = Self::DeviceId> + 's
The iterator provided by this context.
sourcetype 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 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.
sourcetype WithIpDeviceConfigurationMutInner<'s>: WithIpDeviceConfigurationMutInner<I, BC, DeviceId = Self::DeviceId> + 's
type WithIpDeviceConfigurationMutInner<'s>: WithIpDeviceConfigurationMutInner<I, BC, DeviceId = Self::DeviceId> + 's
The inner mutable configuration context.
sourcetype DeviceAddressAndGroupsAccessor<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId> + GmpQueryHandler<I, BC> + 's
type DeviceAddressAndGroupsAccessor<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId> + GmpQueryHandler<I, BC> + 's
Provides access to device state.
Required Methods§
sourcefn 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<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
.
sourcefn with_ip_device_configuration_mut<O, F: FnOnce(Self::WithIpDeviceConfigurationMutInner<'_>) -> 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
Calls the function with a WithIpDeviceConfigurationMutInner
.
sourcefn with_devices_and_state<O, F: FnOnce(Self::DevicesIter<'_>, Self::DeviceAddressAndGroupsAccessor<'_>) -> O>(
&mut self,
cb: F,
) -> O
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.
sourcefn loopback_id(&mut self) -> Option<Self::DeviceId>
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.