feat(hid): 增加 HID 后端健康检查与错误码上报,完善前端掉线恢复状态同步及错误提示展示

This commit is contained in:
mofeng-git
2026-02-20 20:30:12 +08:00
parent 016c0d5dbb
commit 486db7b4aa
10 changed files with 378 additions and 24 deletions

View File

@@ -104,6 +104,13 @@ pub trait HidBackend: Send + Sync {
/// Shutdown the backend
async fn shutdown(&self) -> Result<()>;
/// Perform backend health check.
///
/// Default implementation assumes backend is healthy.
fn health_check(&self) -> Result<()> {
Ok(())
}
/// Check if backend supports absolute mouse positioning
fn supports_absolute_mouse(&self) -> bool {
false