Closed ultimaweapon closed 1 month ago
IoCmd should probably be remade using a proc macro. Declarative macros are too restrictive for this use case.. We could make a trait like
trait Command: Sized {
type Repr;
fn try_from_raw_parts(which: Self::Repr, ptr: *mut ()) -> Result<Self, SysErr>;
}
and derive it. It could also be reused for other command-like arguments like in sys_regmgr. Sys_netcontrol also has something similar I think. Sys_ipmimgr as well.
Because hiding it in the macro make the code hard to understand.