Newer
Older

CARDILE VINCENT
committed
use serde_json::Value;
// use serde::{
// Serialize,
// Deserialize,
// };
pub const REQUEST_BODY: &str = "{\"destination\":\"\", \"origin\": \"1\", \"control\": \"{1}\", \"data\": \"{2}\", \"identity\":\"{3}\"}, \"sender_identity\":\"{4}\"";

CARDILE VINCENT
committed
/*
* 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_s: std::sync::mpsc::Sender<Value>,
pub chan_r: std::sync::mpsc::Receiver<Value>
}
pub struct Com {
pub chan_s: std::sync::mpsc::Sender<Value>,
pub chan_r: std::sync::mpsc::Receiver<Value>

CARDILE VINCENT
committed
}
/*
* 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
// }

CARDILE VINCENT
committed
#[derive(Clone)]
pub struct Flags {
pub debug: bool,
pub model: bool,
pub model_name: String,
pub bypass: bool,