netstack3_ip::nud

Trait DelegateNudContext

Source
pub trait DelegateNudContext<I: Ip>: UseDelegateNudContext + Sized {
    type Delegate<T>: RefCast<From = T>;

    // Provided method
    fn wrap(&mut self) -> &mut Self::Delegate<Self> { ... }
}
Expand description

Enables a blanket implementation of NudContext via delegate that can wrap a mutable reference of Self.

The UseDelegateNudContext requirement here is steering users to to the right thing to enable the blanket implementation.

Required Associated Types§

Source

type Delegate<T>: RefCast<From = T>

The delegate that implements NudContext.

Provided Methods§

Source

fn wrap(&mut self) -> &mut Self::Delegate<Self>

Wraps self into a mutable delegate reference.

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.

Implementors§