refactor(frontend): Maps are dea dlong live Objects, also delay main body render untill VM is fully loaded
This commit is contained in:
@@ -15,6 +15,7 @@ num-integer = "0.1.46"
|
||||
phf = "0.11.2"
|
||||
serde = "1.0.202"
|
||||
serde_derive = "1.0.202"
|
||||
serde_with = "3.8.1"
|
||||
strum = { version = "0.26.2", features = ["derive", "phf", "strum_macros"] }
|
||||
tsify = { version = "0.4.5", optional = true, features = ["json"] }
|
||||
wasm-bindgen = { version = "0.2.92", optional = true }
|
||||
|
||||
@@ -5,6 +5,9 @@ use crate::enums::{
|
||||
script::{LogicSlotType, LogicType},
|
||||
ConnectionRole, ConnectionType, MachineTier, MemoryAccess, Species,
|
||||
};
|
||||
|
||||
use serde_with::{serde_as, DisplayFromStr, Map};
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
#[cfg(feature = "tsify")]
|
||||
use tsify::Tsify;
|
||||
@@ -195,11 +198,14 @@ pub struct SlotInfo {
|
||||
pub typ: Class,
|
||||
}
|
||||
|
||||
#[serde_as]
|
||||
#[derive(Clone, Debug, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))]
|
||||
pub struct LogicInfo {
|
||||
#[serde_as( as = "BTreeMap<DisplayFromStr, _>")]
|
||||
pub logic_slot_types: BTreeMap<u32, BTreeMap<LogicSlotType, MemoryAccess>>,
|
||||
pub logic_types: BTreeMap<LogicType, MemoryAccess>,
|
||||
#[serde_as( as = "Option<BTreeMap<DisplayFromStr, _>>")]
|
||||
pub modes: Option<BTreeMap<u32, String>>,
|
||||
pub transmission_receiver: bool,
|
||||
pub wireless_logic: bool,
|
||||
|
||||
Reference in New Issue
Block a user