pub trait DadAddressContext<I: Ip, BC>: IpDeviceAddressIdContext<I> {
// Required methods
fn with_address_assigned<O, F: FnOnce(&mut bool) -> O>(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
cb: F,
) -> O;
fn should_perform_dad(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
) -> bool;
}
Expand description
The execution context while performing DAD.
Required Methods§
Sourcefn with_address_assigned<O, F: FnOnce(&mut bool) -> O>(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
cb: F,
) -> O
fn with_address_assigned<O, F: FnOnce(&mut bool) -> O>( &mut self, device_id: &Self::DeviceId, addr: &Self::AddressId, cb: F, ) -> O
Calls the function with a mutable reference to the address’s assigned flag.
Sourcefn should_perform_dad(
&mut self,
device_id: &Self::DeviceId,
addr: &Self::AddressId,
) -> bool
fn should_perform_dad( &mut self, device_id: &Self::DeviceId, addr: &Self::AddressId, ) -> bool
Returns whether or not DAD should be performed for the given device and address.
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.