GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
refactor(widget)!: serialize_widgets takes dyn refs, not boxes (Phase 6bb)
The designer's roster is concretely typed now (its Vec<Box<dyn Element>> is
gone); the serialize path takes a per-slot dyn view instead of the erased
storage. Designer is the only caller.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018u7qTwzX95dd5ysAkaSCLk
src/widget/display/serialize.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/widget/display/serialize.rs b/src/widget/display/serialize.rs
index 96bc905..3ed1ceb 100644
--- a/src/widget/display/serialize.rs
+++ b/src/widget/display/serialize.rs
@@ -82,7 +82,9 @@ fn serialize_single_widget(w: &dyn Element, json: &mut String) {
}
}
-pub fn serialize_widgets(widgets: &[Box<dyn Element>]) -> String {
+/// Serialize the visible widgets' menu state. Takes dyn refs (not boxes): the designer's
+/// roster is concretely typed since the Phase 6bb retype and lends a per-slot dyn view.
+pub fn serialize_widgets(widgets: &[&dyn Element]) -> String {
let mut json = String::new();
json.push('[');
let mut first = true;