use serde::Deserialize; #[derive(Debug, Clone, Deserialize)] pub struct Level { id: String, name: String, description: String, init_board: Option, inputs: Vec, outputs: Vec, } impl Level { pub fn id(&self) -> &str { &self.id } pub fn name(&self) -> &str { &self.name } pub fn description(&self) -> &str { &self.description } pub fn init_board(&self)->Option{ self.init_board.clone() } pub fn inputs(&self) -> &[u8] { &self.inputs } pub fn outputs(&self) -> &[u8] { &self.outputs } }