On Mon, Dec 09, 2024 at 01:37:14PM +0100, Paolo Bonzini wrote: > Date: Mon, 9 Dec 2024 13:37:14 +0100 > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: [PATCH 23/26] rust: qom: add initial subset of methods on Object > X-Mailer: git-send-email 2.47.1 > > Add an example of implementing instance methods and converting the > result back to a Rust type. In this case the returned types are a > string (actually a Cow<str>; but that's transparent as long as it derefs > to &str) and a QOM class. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > rust/qemu-api/src/prelude.rs | 1 + > rust/qemu-api/src/qom.rs | 56 ++++++++++++++++++++++++++++++++++-- > rust/qemu-api/tests/tests.rs | 12 ++++++++ > 3 files changed, 66 insertions(+), 3 deletions(-) >
Good example! Reviewed-by: Zhao Liu <zhao1....@intel.com>