pub trait EthernetIpLinkDeviceDynamicStateContext<BC: EthernetIpLinkDeviceBindingsContext>: EthernetIpLinkDeviceStaticStateContext {
// Required methods
fn with_ethernet_state<O, F: FnOnce(&StaticEthernetDeviceState, &DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_ethernet_state_mut<O, F: FnOnce(&StaticEthernetDeviceState, &mut DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
}
Expand description
Provides access to an ethernet device’s dynamic state.
Required Methods§
Sourcefn with_ethernet_state<O, F: FnOnce(&StaticEthernetDeviceState, &DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ethernet_state<O, F: FnOnce(&StaticEthernetDeviceState, &DynamicEthernetDeviceState) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with the ethernet device’s static state and immutable reference to the dynamic state.
Sourcefn with_ethernet_state_mut<O, F: FnOnce(&StaticEthernetDeviceState, &mut DynamicEthernetDeviceState) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_ethernet_state_mut<O, F: FnOnce(&StaticEthernetDeviceState, &mut DynamicEthernetDeviceState) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with the ethernet device’s static state and mutable reference to the dynamic state.
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.