summary refs log tree commit diff stats
path: root/rust/qemu-api/src/memory.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-28 10:20:48 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-06-17 09:54:52 +0200
commit8d394f6cf0b50a82758b651e81a18dac13e70e7d (patch)
tree26a7a00571b641285988085211aa45a1be6c703e /rust/qemu-api/src/memory.rs
parenta44122258328a33aaa776c21277e6d4f98ab3d1f (diff)
downloadfocaccia-qemu-8d394f6cf0b50a82758b651e81a18dac13e70e7d.tar.gz
focaccia-qemu-8d394f6cf0b50a82758b651e81a18dac13e70e7d.zip
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>
Diffstat (limited to 'rust/qemu-api/src/memory.rs')
0 files changed, 0 insertions, 0 deletions