aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src/definitions.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-28 10:29:27 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-10 18:49:26 +0100
commit8c80c472da6342c5924bc4ea7e87c77ca61477b8 (patch)
tree4343d0f5b9df3868acc1b3e2c272154da39408f8 /rust/qemu-api/src/definitions.rs
parentc6c4f3e0d90990c642523c087482eac3f42566c1 (diff)
downloadqemu-8c80c472da6342c5924bc4ea7e87c77ca61477b8.zip
qemu-8c80c472da6342c5924bc4ea7e87c77ca61477b8.tar.gz
qemu-8c80c472da6342c5924bc4ea7e87c77ca61477b8.tar.bz2
rust: qdev: move device_class_init! body to generic function, ClassInitImpl implementation to macro
Use a trait to access the former parameters to device_class_init!. This allows hiding the details of the class_init implementation behind a generic function and makes higher-level functionality available from qemu_api. The implementation of ClassInitImpl is then the same for all devices and is easily macroized. Later on, we can remove the need to implement ClassInitImpl by hand for all device types, and stop making rust_device_class_init<>() public. While at it, document the members of DeviceImpl. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/definitions.rs')
0 files changed, 0 insertions, 0 deletions