mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00
rust: qdev: move bridge for realize and reset functions out of pl011
Allow the DeviceImpl trait to expose safe Rust functions. rust_device_class_init<> adds thunks around the functions in DeviceImpl. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8c80c472da
commit
f75fb90ff2
4 changed files with 33 additions and 36 deletions
|
@ -47,7 +47,7 @@ pub trait ObjectImpl: ClassInitImpl + Sized {
|
|||
/// Each QOM type has one such class struct.
|
||||
///
|
||||
/// The Rust implementation of methods will usually come from a trait
|
||||
/// like [`ObjectImpl`].
|
||||
/// like [`ObjectImpl`] or [`DeviceImpl`](crate::device_class::DeviceImpl).
|
||||
pub trait ClassInitImpl {
|
||||
/// Function that is called after all parent class initialization
|
||||
/// has occurred. On entry, the virtual method pointers are set to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue