use crate::serial_core::error::CodecError;
use std::time::Instant;

pub trait Codec<F> {
    fn decode(&mut self, input: &[u8], session_started_at: Instant) -> Result<Vec<F>, CodecError>;
    fn encode(&self, frame: &F) -> Result<Vec<u8>, CodecError>;
}
