diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-04 08:58:46 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-10 23:34:44 +0100 |
| commit | 809c703a60240125eec16ec134f60793134b4f61 (patch) | |
| tree | 2d7cbaf0524a078cc85ceb52cf7d3ff377c51ea6 /rust/qemu-api/src/offset_of.rs | |
| parent | a3b620fff73ec762f2a77a077eb8389dddab4833 (diff) | |
| download | focaccia-qemu-809c703a60240125eec16ec134f60793134b4f61.tar.gz focaccia-qemu-809c703a60240125eec16ec134f60793134b4f61.zip | |
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>
Diffstat (limited to 'rust/qemu-api/src/offset_of.rs')
0 files changed, 0 insertions, 0 deletions