]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust: add a utility module for compile-time type checks
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Dec 2024 11:18:06 +0000 (12:18 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jan 2025 22:34:43 +0000 (23:34 +0100)
commit7f65d4e58b67d6e5ee05c9381a50ef1eba3a5a1e
treec95e80c41e4eb93b73f17236a9d1022008476e50
parentca0d60a6ad777ab617cbc4e6f328eaff60617b3f
rust: add a utility module for compile-time type checks

It is relatively common in the low-level qemu_api code to assert that
a field of a struct has a specific type; for example, it can be used
to ensure that the fields match what the qemu_api and C code expects
for safety.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/qemu-api/meson.build
rust/qemu-api/src/assertions.rs [new file with mode: 0644]
rust/qemu-api/src/lib.rs