Trait netstack3_ip::nud::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.

Object Safety§

This trait is not object safe.

Implementors§