1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
use crate::{CfgAction, CfgLabel}; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgErrorBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, #[serde(skip_serializing_if = "Option::is_none")] pub error: Option<crate::InvalidActionError>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgIfBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub if_true: Option<CfgLabel>, pub if_false: Option<CfgLabel>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgReturnBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgSimpleBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub next: Option<CfgLabel>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgTryBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub r#try: crate::Cfg, #[serde(skip_serializing_if = "Option::is_none")] pub catch: Option<crate::Cfg>, pub catch_target: crate::actions::r#try::CatchTarget, #[serde(skip_serializing_if = "Option::is_none")] pub finally: Option<crate::Cfg>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgWaitForFrameBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub frame: u16, pub if_loaded: Option<CfgLabel>, pub if_not_loaded: Option<CfgLabel>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgWaitForFrame2Block { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub if_loaded: Option<CfgLabel>, pub if_not_loaded: Option<CfgLabel>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgWithBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, pub with: crate::Cfg, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct CfgThrowBlock { pub label: CfgLabel, pub actions: Vec<CfgAction>, }