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
use serde::{Deserialize, Serialize}; //////////////////////////////////////////////////////////////////////////////// // DATA STRUCTURE //////////////////////////////////////////////////////////////////////////////// #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CsmlFlow { pub id: String, pub name: String, pub content: String, pub commands: Vec<String>, } //////////////////////////////////////////////////////////////////////////////// // METHOD FUNCTIONS //////////////////////////////////////////////////////////////////////////////// impl CsmlFlow { pub fn new(id: &str, name: &str, content: &str, commands: Vec<String>) -> Self { Self { id: id.to_owned(), name: name.to_owned(), content: content.to_owned(), commands, } } }