- 添加 README.md 项目文档 - 更新 .gitignore 排除 JE-Skin/、eskin-finger-sdk/ 及构建产物 - 从 git 跟踪中移除 JE-Skin 和 eskin-finger-sdk Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
8 lines
254 B
Rust
8 lines
254 B
Rust
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>;
|
|
}
|