pub trait DeviceConfigurationContext<D: Device>: DeviceIdContext<D> {
// Required methods
fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O;
fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O;
}Expand description
A trait abstracting device configuration.
This trait allows the device API to perform device confiuration at the device layer.
Required Methods§
Sourcefn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config<I: Ip, O, F: FnOnce(Option<&NudUserConfig>) -> O>( &mut self, device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version I.
If the device does not support NUD, the callback is called with None,
Sourcefn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>(
&mut self,
device_id: &Self::DeviceId,
f: F,
) -> O
fn with_nud_config_mut<I: Ip, O, F: FnOnce(Option<&mut NudUserConfig>) -> O>( &mut self, device_id: &Self::DeviceId, f: F, ) -> O
Calls the callback with a mutable reference to the NUD user
configuration for IP version I.
If the device does not support NUD, the callback is called with None,
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.