use serde::Serialize; use super::macros::to_wasm; use super::standard_properties::WasmStandardProperties; use super::to_wasm::ToWasm; use crate::types::Drawer; use crate::wasm::to_wasm::ToWasmStandardProperties; use crate::wasm::WasmAstNode; #[derive(Debug, Serialize)] #[serde(tag = "ast_node")] #[serde(rename = "org-data")] pub struct WasmDrawer<'s, 'p> { standard_properties: WasmStandardProperties, children: Vec>, } to_wasm!( WasmDrawer<'s, 'p>, Drawer<'s>, original, wasm_context, standard_properties, { Ok(WasmDrawer { standard_properties, children: Vec::new(), }) } ); impl<'s, 'p> Into> for WasmDrawer<'s, 'p> { fn into(self) -> WasmAstNode<'s, 'p> { WasmAstNode::Drawer(self) } }