#![allow(dead_code)]
use cc_talk_core::cc_talk::{Category, Header};
pub trait CommandSet {
const NAME: &'static str;
fn is_compatible_with(category: Category) -> bool;
}
pub trait BelongsTo<CS: CommandSet> {}
pub trait Command {
type Response;
fn header(&self) -> Header;
fn data(&self) -> &[u8];
fn parse_response(&self, response_payload: &[u8])
-> Result<Self::Response, ParseResponseError>;
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ParseResponseError {
DataLengthMismatch(usize, usize),
ParseError(&'static str),
BufferTooSmall,
}