Trait netstack3_base::DeviceIdAnyCompatContext

source ·
pub trait DeviceIdAnyCompatContext<D: Device>: DeviceIdContext<D> + DeviceIdContext<AnyDevice, DeviceId: From<<Self as DeviceIdContext<D>>::DeviceId>, WeakDeviceId: From<<Self as DeviceIdContext<D>>::WeakDeviceId>> { }
Expand description

A marker trait tying DeviceIdContext implementations.

To call into the IP layer, we need to be able to represent device identifiers in the AnyDevice domain. This trait is a statement that a DeviceIdContext in some domain D has its identifiers convertible into the AnyDevice domain with From bounds.

It is provided as a blanket implementation for DeviceIdContexts that fulfill the conversion.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<CC, D> DeviceIdAnyCompatContext<D> for CC
where D: Device, CC: DeviceIdContext<D> + DeviceIdContext<AnyDevice, DeviceId: From<<CC as DeviceIdContext<D>>::DeviceId>, WeakDeviceId: From<<CC as DeviceIdContext<D>>::WeakDeviceId>>,