Trait netstack3_ip::device::IpDeviceAddressContext

source ·
pub trait IpDeviceAddressContext<I: IpDeviceIpExt, BT: InstantBindingsTypes>: IpDeviceAddressIdContext<I> {
    // Required methods
    fn with_ip_address_state<O, F: FnOnce(&I::AddressState<BT::Instant>) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        addr_id: &Self::AddressId,
        cb: F,
    ) -> O;
    fn with_ip_address_state_mut<O, F: FnOnce(&mut I::AddressState<BT::Instant>) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        addr_id: &Self::AddressId,
        cb: F,
    ) -> O;
}
Expand description

The core context providing access to device IP address state.

Required Methods§

source

fn with_ip_address_state<O, F: FnOnce(&I::AddressState<BT::Instant>) -> O>( &mut self, device_id: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O

Calls the callback with a reference to the address state addr_id on device_id.

source

fn with_ip_address_state_mut<O, F: FnOnce(&mut I::AddressState<BT::Instant>) -> O>( &mut self, device_id: &Self::DeviceId, addr_id: &Self::AddressId, cb: F, ) -> O

Calls the callback with a mutable reference to the address state addr_id on device_id.

Object Safety§

This trait is not object safe.

Implementors§