All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
21 lines
490 B
Rust
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",
|
|
})
|
|
}
|
|
}
|