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> + '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> + 's
type DeviceAddressAndGroupsAccessor<'s>: IpDeviceStateContext<I, BC, DeviceId = Self::DeviceId> + '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.
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.