Re: [PATCH 09/12] rust: qdev: expose inherited methods to subclasses of SysBusDevice

2024-12-25 Thread Zhao Liu
On Fri, Dec 20, 2024 at 03:29:51PM +0100, Paolo Bonzini wrote: > Date: Fri, 20 Dec 2024 15:29:51 +0100 > From: Paolo Bonzini > Subject: [PATCH 09/12] rust: qdev: expose inherited methods to subclasses > of SysBusDevice > X-Mailer: git-send-email 2.47.1 > > The ObjectDeref t

[PATCH 09/12] rust: qdev: expose inherited methods to subclasses of SysBusDevice

2024-12-20 Thread Paolo Bonzini
The ObjectDeref trait now provides all the magic that is required to fake inheritance. Replace the "impl SysBusDevice" block of qemu_api::sysbus with a trait, so that sysbus_init_irq() can be invoked as "self.init_irq()" without any intermediate upcast. Signed-off-by: Paolo Bonzini --- rust/hw/