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§

source

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.

source

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.

Object Safety§

This trait is not object safe.

Implementors§