12345678910111213141516171819202122232425 |
- use serde::{Serialize, Deserialize};
- use std::collections::HashMap;
- pub type YamlRoot = HashMap<String, Module>;
- pub type Module = HashMap<String, Function>;
- #[derive(Serialize, Deserialize, PartialEq, Debug)]
- pub struct Function {
- pub efid: String,
- pub desc: Option<String>,
- pub params: Option<Vec<Param>>,
- pub results: Option<Vec<Param>>,
- }
- #[derive(Serialize, Deserialize, PartialEq, Debug)]
- pub struct Param {
- pub name: String,
- pub desc: Option<String>,
- #[serde(rename = "type")]
- pub rtype: String,
- pub xtyp: Option<String>,
- #[serde(rename = "enum")]
- pub enumeration: Option<HashMap<String, String>>,
- }
|