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. }