pub trait DeviceContext: Sealed { }Expand description
Marker trait for the context or scope of a bus specific device.
DeviceContext is a marker trait for types representing the context of a bus specific
Device.
The specific device context types are: CoreInternal, Core, Bound and Normal.
DeviceContext types are hierarchical, which means that there is a strict hierarchy that
defines which DeviceContext type can be derived from another. For instance, any
Device<Core> can dereference to a Device<Bound>.
The following enumeration illustrates the dereference hierarchy of DeviceContext types.
CoreInternal=>Core=>Bound=>Normal
Bus devices can automatically implement the dereference hierarchy by using
impl_device_context_deref.
Note that the guarantee for a Device reference to have a certain DeviceContext comes
from the specific scope the Device reference is valid in.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".