pub trait NudContext<I: Ip, D: LinkDevice, BC: NudBindingsTypes<D>>: DeviceIdContext<D> {
type ConfigCtx<'a>: NudConfigContext<I>;
type SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>;
// Required methods
fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::SenderCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_nud_state_mut<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn send_neighbor_solicitation(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
lookup_addr: SpecifiedAddr<I::Addr>,
remote_link_addr: Option<D::Address>,
);
}
Expand description
The execution context for NUD for a link device.
Required Associated Types§
Sourcetype ConfigCtx<'a>: NudConfigContext<I>
type ConfigCtx<'a>: NudConfigContext<I>
The inner configuration context.
Sourcetype SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>
type SenderCtx<'a>: NudSenderContext<I, D, BC, DeviceId = Self::DeviceId>
The inner send context.
Required Methods§
Sourcefn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::SenderCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state_mut_and_sender_ctx<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::SenderCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the NUD state and the core sender context.
Sourcefn with_nud_state_mut<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::ConfigCtx<'_>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state_mut<O, F: FnOnce(&mut NudState<I, D, BC>, &mut Self::ConfigCtx<'_>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with a mutable reference to the NUD state and NUD configuration for the device.
Sourcefn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_nud_state<O, F: FnOnce(&NudState<I, D, BC>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls the function with an immutable reference to the NUD state.
Sourcefn send_neighbor_solicitation(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
lookup_addr: SpecifiedAddr<I::Addr>,
remote_link_addr: Option<D::Address>,
)
fn send_neighbor_solicitation( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, lookup_addr: SpecifiedAddr<I::Addr>, remote_link_addr: Option<D::Address>, )
Sends a neighbor probe/solicitation message.
If remote_link_addr
is provided, the message will be unicasted to that
address; if it is None
, the message will be multicast.
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.