use std::collections::HashMap; trait Content {} trait Message { fn name(&self) -> String; } #[derive(Serialize)] pub struct Callback { pub path: Vec, pub request: HashMap, } impl Message for Callback { fn name(&self) -> String { String::from("CALLBACK") } }