dchatmsg.rs 360 B

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