[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/10] rust: qdev: make ObjectImpl a supertrait of DeviceImpl
From: |
Paolo Bonzini |
Subject: |
[PATCH 07/10] rust: qdev: make ObjectImpl a supertrait of DeviceImpl |
Date: |
Fri, 17 Jan 2025 20:40:00 +0100 |
In practice it has to be implemented always in order to access an
implementation of ClassInitImpl<ObjectClass>. Make the relationship
explicit in the code.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/qemu-api/src/qdev.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/qemu-api/src/qdev.rs b/rust/qemu-api/src/qdev.rs
index f573712550e..ab883e2faef 100644
--- a/rust/qemu-api/src/qdev.rs
+++ b/rust/qemu-api/src/qdev.rs
@@ -21,7 +21,7 @@
};
/// 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).
--
2.47.1
- [RFC PATCH 00/10] rust: remaining part of qdev bindings, Paolo Bonzini, 2025/01/17
- [PATCH 01/10] rust: qemu-api: add sub-subclass to the integration tests, Paolo Bonzini, 2025/01/17
- [PATCH 02/10] rust: qom: add reference counting functionality, Paolo Bonzini, 2025/01/17
- [PATCH 03/10] rust: qom: add object creation functionality, Paolo Bonzini, 2025/01/17
- [PATCH 04/10] rust: callbacks: allow passing optional callbacks as (), Paolo Bonzini, 2025/01/17
- [PATCH 06/10] rust: qom: allow initializing interface vtables, Paolo Bonzini, 2025/01/17
- [PATCH 07/10] rust: qdev: make ObjectImpl a supertrait of DeviceImpl,
Paolo Bonzini <=
- [PATCH 05/10] rust: qdev: add clock creation, Paolo Bonzini, 2025/01/17
- [PATCH 09/10] rust: bindings: add Sync markers to types referred to by MemoryRegionOps, Paolo Bonzini, 2025/01/17
- [PATCH 08/10] rust: qdev: switch from legacy reset to Resettable, Paolo Bonzini, 2025/01/17
- [PATCH 10/10] rust: bindings for MemoryRegionOps, Paolo Bonzini, 2025/01/17