mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
rust: vmstate: convert to use builder pattern
Similar to MemoryRegionOps, the builder pattern has two advantages: 1) it makes it possible to build a VMStateDescription that knows which types it will be invoked on; 2) it provides a way to wrap the callbacks and let devices avoid "unsafe". Unfortunately, building a static VMStateDescription requires the builder methods to be "const", and because the VMStateFields are *also* static, this requires const_refs_static. So this requires Rust 1.83.0. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250908105005.2119297-8-pbonzini@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ module status
|
||||
``qom`` stable
|
||||
``sysbus`` stable
|
||||
``timer`` stable
|
||||
``vmstate`` proof of concept
|
||||
``vmstate`` stable
|
||||
``zeroable`` stable
|
||||
================ ======================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user