qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 23/26] rust: qom: add initial subset of methods on Object


From: Zhao Liu
Subject: Re: [PATCH 23/26] rust: qom: add initial subset of methods on Object
Date: Mon, 16 Dec 2024 23:18:59 +0800

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 <pbonzini@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 <pbonzini@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.liu@intel.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]