iced_chat_widget/
message.rs

1use chrono::{DateTime, Utc};
2
3pub trait ChatMessage {
4    fn id(&self) -> u32;
5    fn content(&self) -> &str;
6    fn author_id(&self) -> &str;
7    fn timestamp(&self) -> DateTime<Utc>; // unix timestamp
8    fn is_own_message(&self) -> bool;
9    fn set_id(&mut self, id: u32);
10}