aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src/uninit.rs
AgeCommit message (Collapse)AuthorFilesLines
11 daysrust: qemu_api: introduce MaybeUninit field projectionPaolo Bonzini1-0/+85
Add a macro that makes it possible to convert a MaybeUninit<> into another MaybeUninit<> for a single field within it. Furthermore, it is possible to use the resulting MaybeUninitField<> in APIs that take the parent object, such as memory_region_init_io(). This allows removing some of the undefined behavior from instance_init() functions, though this may not be the definitive implementation. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>