[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>
- Re: [PATCH 24/26] rust: qom: move device_id to PL011 class side, (continued)
[PATCH 23/26] rust: qom: add initial subset of methods on Object, Paolo Bonzini, 2024/12/09
- Re: [PATCH 23/26] rust: qom: add initial subset of methods on Object,
Zhao Liu <=
[PATCH 21/26] rust: tests: allow writing more than one test, Paolo Bonzini, 2024/12/09
[PATCH 12/26] rust: qdev: move bridge for realize and reset functions out of pl011, Paolo Bonzini, 2024/12/09
[PATCH 18/26] rust: qom: add possibility of overriding unparent, Paolo Bonzini, 2024/12/09
[PATCH 25/26] rust: qemu-api: add a module to wrap functions and zero-sized closures, Paolo Bonzini, 2024/12/09