| 65 | #[derive(Clone, Debug, Deserialize)] |
| 66 | #[serde(rename_all = "camelCase")] |
| 67 | pub struct Level { |
| 68 | #[serde(rename = "__neighbours")] |
| 69 | pub neighbours: Vec<Neighbour>, |
| 70 | |
| 71 | pub identifier: String, |
| 72 | |
| 73 | pub iid: String, |
| 74 | |
| 75 | #[serde(rename = "pxWid")] |
| 76 | pub width: i32, |
| 77 | |
| 78 | #[serde(rename = "pxHei")] |
| 79 | pub height: i32, |
| 80 | |
| 81 | #[serde(default = "Vec::new")] |
| 82 | pub layer_instances: Vec<LayerInstance>, |
| 83 | } |
| 84 | |
| 85 | impl Level { |
| 86 | pub fn get_layer(&self, id: &str) -> Option<&LayerInstance> { |
nothing calls this directly
no outgoing calls
no test coverage detected