Files
robotnik/src/commands.rs

19 lines
416 B
Rust
Raw Normal View History

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}")
}
}
}
}