You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: add trait function const_device_type to use in Sized contexts
By defining an associated function to the trait, we can simplify the
logic to execute code on a specific device from the VMM, while also
statically guaranteeing we are passing the right constant.
The downside is that we need both a sized and a dyn implementation for
the function. To ensure devices implement them correctly, a utility
macro is provided. We cannot do it as a default trait impl as the const_
variant is only defined on Sized.
Signed-off-by: Riccardo Mancini <[email protected]>
0 commit comments