use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use std::fmt::Debug;

pub mod set_pin;
pub mod set_rcs;
pub mod valid_priority_command;
pub mod set_pwm;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct CommandHeader<'a> {
    pub name: &'a str,
    pub data: &'a [u8],
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct OwnedCommandHeader {
    pub name: String,
    pub data: Vec<u8>,
}

pub trait Command: Serialize + DeserializeOwned {}

impl Command for () {}
