Open lauralt opened 3 years ago
Adding some things we ran into here:
It looks like bindgen
does not autogenerate derives/implementations of Clone
for structs that contain __IncompleteArrayField<T>
members (in the kvm-bindings
crate for example). We could investigate/ask why that is the case. If we can rely on a FamStruct: Clone
trait bound, then we can simplify the clone
operation for FamStructWrapper
s by directly cloning the inner Vec
(and generally speaking, there doesn't seem to be any reason why POD objects cannot implement Clone
).
We do mention that implementors of FamStruct
and their entires are supposed to be POD structs, but it seems there is room for interpretation and regarding precisely what that means. We should try to come up with a crisper, more explicit, requirement list for the FamStruct
safety contract, even if it means being more specific than otherwise necessary.
fam
module is difficult to follow and might benefit from a better and more intuitive design.