#[macro_use]
extern crate serde_derive;
extern crate ommui_file_loading;
extern crate ommui_string_patterns;
extern crate xio_base_datatypes;
use ommui_string_patterns::{freetextstring, idstring};
use std::collections::BTreeMap;
use xio_base_datatypes as base;
pub mod filesystem;
pub type InstructionMap = BTreeMap<String, Instruction>;
#[derive(Serialize, Deserialize, Debug, PartialEq)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct Instruction {
pub code: u16,
#[serde(with = "freetextstring")]
pub description: String,
#[serde(with = "freetextstring")]
pub format_string: String,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub parameters: Vec<InstructionParameter>,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct InstructionParameter {
#[serde(with = "idstring")]
pub id: String,
#[serde(rename = "type")]
pub parameter_type: Vec<base::DataType>,
pub storage: base::StorageTypeWithMixed,
#[serde(with = "freetextstring")]
pub description: String,
#[serde(with = "freetextstring")]
pub format_string: String,
}