dchatmsg.rs 368 B

12345678910111213141516171819
  1. use async_std::sync::{Arc, Mutex};
  2. use darkfi::{
  3. net,
  4. util::serial::{SerialDecodable, SerialEncodable},
  5. };
  6. pub type DchatMsgsBuffer = Arc<Mutex<Vec<DchatMsg>>>;
  7. impl net::Message for DchatMsg {
  8. fn name() -> &'static str {
  9. "DchatMsg"
  10. }
  11. }
  12. #[derive(Debug, Clone, SerialEncodable, SerialDecodable)]
  13. pub struct DchatMsg {
  14. pub msg: String,
  15. }