use serde_json::Value; use serde::{ Serialize, Deserialize }; pub const REQUEST_BODY: &str = "{\"origin\": \"-1\", \"control\": \"{1}\", \"data\": \"{2}\"}"; /* * Node struct * * @param id: String node id * @param chan: std::sync::mpsc::Sender<Value> channel to comunicate with the node */ pub struct Node { pub id: String, pub chan: std::sync::mpsc::Sender<Value> } /* * Message struct * * @param id: String message id * @param message: String message */ #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Message { pub id: String, pub message: String } #[derive(Clone)] pub struct Flags { pub debug: bool, pub model: bool, pub model_name: String, pub bypass: bool, }