qemu/rust/qemu-api-macros/src
Paolo Bonzini 809c703a60 rust: qemu-api-macros: add automatic TryFrom/TryInto derivation
This is going to be fairly common. Using a custom procedural macro
provides better error messages and automatically finds the right
type.

Note that this is different from the same-named macro in the
derive_more crate.  That one provides conversion from e.g. tuples
to enums with tuple variants, not from integers to enums.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-01-10 23:34:44 +01:00
..
lib.rs rust: qemu-api-macros: add automatic TryFrom/TryInto derivation 2025-01-10 23:34:44 +01:00
utils.rs rust: qemu-api-macros: extend error reporting facility to parse errors 2025-01-10 23:34:43 +01:00