kjuulh ea5adb2f93
All checks were successful
continuous-integration/drone/push Build is passing
feat: add common queue
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-11-24 21:08:37 +01:00

21 lines
490 B
Rust

use std::{collections::BTreeMap, fmt::Display};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(tag = "type")]
pub enum Commands {
ScheduleTask {
task: String,
properties: BTreeMap<String, String>,
},
}
impl Display for Commands {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(match self {
Commands::ScheduleTask { .. } => "schedule_task",
})
}
}