#[wasm_bindgen]
#[derive(Debug, Clone, Copy)]
pub struct End;
#[wasm_bindgen]
#[derive(Debug)]
pub struct Data {
pub end: End,
pub value: LinkedHashMap<String, Box<dyn MOC>>,
}
#[wasm_bindgen]
#[derive(Debug, Hash, PartialEq, Eq)]
pub struct String {
pub length: u16,
pub value: std::string::String,
}
impl MOC for End {
//snip
}
impl MOC for Data {
//snip
}
impl MOC for String {
//snip
}
如何将Data结构体导出为JS对象?(不需要包含特征的实现)
1
共 1 条评论, 1 页
评论区
写评论serde_json