Implementing fifo channel, and command structure.

This commit is contained in:
2025-11-13 04:35:38 -06:00
committed by Micheal Smith
parent 21d9c3f002
commit 8ec4f2860c
3 changed files with 27 additions and 7 deletions

18
src/commands.rs Normal file
View File

@@ -0,0 +1,18 @@
use std::fmt::Display;
use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub enum Command {
SendMessage { channel: String, message: String },
}
impl Display for Command {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::SendMessage { channel, message } => {
write!(f, "[{channel}]: {message}")
}
}
}
}