diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-07 12:01:18 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-13 12:19:33 +0100 |
commit | 68da5402df003a855c581563acc6f5f8c5d563f0 (patch) | |
tree | 69f0fca56b741a84762bc9e51c198c229d3638c8 /rust/qemu-api | |
parent | 688c67415858684a2feef4477e6bc8159ac090bd (diff) | |
download | qemu-68da5402df003a855c581563acc6f5f8c5d563f0.zip qemu-68da5402df003a855c581563acc6f5f8c5d563f0.tar.gz qemu-68da5402df003a855c581563acc6f5f8c5d563f0.tar.bz2 |
rust: qdev: make ObjectImpl a supertrait of DeviceImpl
In practice it has to be implemented always in order to access an
implementation of ClassInitImpl<ObjectClass>. Make the relationship
explicit in the code.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api')
-rw-r--r-- | rust/qemu-api/src/qdev.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/qemu-api/src/qdev.rs b/rust/qemu-api/src/qdev.rs index 176c69a..34d24da 100644 --- a/rust/qemu-api/src/qdev.rs +++ b/rust/qemu-api/src/qdev.rs @@ -17,12 +17,12 @@ use crate::{ callbacks::FnCall, cell::bql_locked, prelude::*, - qom::{ClassInitImpl, ObjectClass, Owned}, + qom::{ClassInitImpl, ObjectClass, ObjectImpl, Owned}, vmstate::VMStateDescription, }; /// Trait providing the contents of [`DeviceClass`]. -pub trait DeviceImpl { +pub trait DeviceImpl: ObjectImpl { /// _Realization_ is the second stage of device creation. It contains /// all operations that depend on device properties and can fail (note: /// this is not yet supported for Rust devices). |