commit | 8d394f6cf0b50a82758b651e81a18dac13e70e7d | [log] [tgz] |
---|---|---|
author | Paolo Bonzini <pbonzini@redhat.com> | Fri Feb 28 10:20:48 2025 +0100 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Tue Jun 17 09:54:52 2025 +0200 |
tree | 26a7a00571b641285988085211aa45a1be6c703e | |
parent | a44122258328a33aaa776c21277e6d4f98ab3d1f [diff] |
rust: qom: make ParentInit lifetime-invariant This is the trick that allows the parent-field initializer to be used only for the object that it's meant to be initialized. This way, the owner of a MemoryRegion must be the object that embeds it. More information is in the comments; it's best explained with a simplified example. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>