pub trait IpDeviceContext<I: IpLayerIpExt>: IpDeviceEgressStateContext<I> + IpDeviceIngressStateContext<I> {
type DeviceAndAddressStatusIter<'a>: Iterator<Item = (Self::DeviceId, I::AddressStatus)>;
// Required methods
fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool;
fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>(
&mut self,
addr: SpecifiedAddr<I::Addr>,
cb: F,
) -> R;
fn is_device_unicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool;
}
Expand description
The IP device context provided to the IP layer.
Required Associated Types§
Sourcetype DeviceAndAddressStatusIter<'a>: Iterator<Item = (Self::DeviceId, I::AddressStatus)>
type DeviceAndAddressStatusIter<'a>: Iterator<Item = (Self::DeviceId, I::AddressStatus)>
The iterator provided to IpDeviceContext::with_address_statuses
.
Required Methods§
Sourcefn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool
Is the device enabled?
Sourcefn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>(
&mut self,
addr: SpecifiedAddr<I::Addr>,
cb: F,
) -> R
fn with_address_statuses<F: FnOnce(Self::DeviceAndAddressStatusIter<'_>) -> R, R>( &mut self, addr: SpecifiedAddr<I::Addr>, cb: F, ) -> R
Provides access to the status of an address.
Calls the provided callback with an iterator over the devices for which the address is assigned and the status of the assignment for each device.
Sourcefn is_device_unicast_forwarding_enabled(
&mut self,
device_id: &Self::DeviceId,
) -> bool
fn is_device_unicast_forwarding_enabled( &mut self, device_id: &Self::DeviceId, ) -> bool
Returns true iff the device has unicast forwarding enabled.
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.