Files
darkfi/example/dchat/src/dchatmsg.rs
Luther Blissett bcf031fb8a Update examples.
2022-09-24 16:02:20 +02:00

20 lines
362 B
Rust

use async_std::sync::{Arc, Mutex};
use darkfi::{
net,
serial::{SerialDecodable, SerialEncodable},
};
pub type DchatMsgsBuffer = Arc<Mutex<Vec<DchatMsg>>>;
impl net::Message for DchatMsg {
fn name() -> &'static str {
"DchatMsg"
}
}
#[derive(Debug, Clone, SerialEncodable, SerialDecodable)]
pub struct DchatMsg {
pub msg: String,
}