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§
Sourcefn 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<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
.
Sourcefn 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
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
.
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.