use crate::backend::Input;
use crate::capability::Action;
use crate::event::BoxTime;
pub(crate) type Frame = Vec<u8>;
pub(crate) type Key = u32;
#[derive(Debug)]
pub(crate) enum Incoming {
Reply(Key),
Input {
input: Input,
box_time: Option<BoxTime>,
},
Inputs(Vec<Input>),
StreamLost(crate::backend::InputKind),
Refused {
key: Key,
action: Option<Action>,
},
Noise,
}
pub(crate) trait Codec: Send + 'static {
fn split(&mut self, buffer: &mut Vec<u8>) -> Option<Frame>;
fn classify(&mut self, frame: &Frame) -> Incoming;
}