系统/高级控制 Trait
| 144 | |
| 145 | /// 系统/高级控制 Trait |
| 146 | pub trait SystemControl: Send + Sync { |
| 147 | /// 【硬核特性】USB 端口级复位 |
| 148 | /// 注意:这是一个 unsafe 操作,可能会导致其他 USB 设备短暂断连 |
| 149 | /// # Safety |
| 150 | unsafe fn force_reset(&self) -> Result<()>; |
| 151 | |
| 152 | /// 设置硬件触发模式 |
| 153 | fn set_trigger(&self, config: TriggerConfig) -> Result<()>; |
| 154 | |
| 155 | /// 导出当前配置快照 (用于持久化) |
| 156 | /// 返回值使用 serde_json::Value 以兼容不同后端的配置结构 |
| 157 | #[cfg(feature = "serialize")] |
| 158 | fn export_state(&self) -> Result<serde_json::Value>; |
| 159 | } |
| 160 | |
| 161 | // 【新增】为 Box<T> 实现 Stream,这样 Box<dyn Stream> 也能被当做 Stream 使用 |
| 162 | #[async_trait] |
nothing calls this directly
no outgoing calls
no test coverage detected