Skip to main content

SystemControl

Trait SystemControl 

Source
pub trait SystemControl: Send + Sync {
    // Required methods
    unsafe fn force_reset(&self) -> Result<()>;
    fn set_trigger(&self, config: TriggerConfig) -> Result<()>;
    fn export_state(&self) -> Result<Value>;
}
Expand description

系统/高级控制 Trait

Required Methods§

Source

unsafe fn force_reset(&self) -> Result<()>

【硬核特性】USB 端口级复位 注意:这是一个 unsafe 操作,可能会导致其他 USB 设备短暂断连

§Safety
Source

fn set_trigger(&self, config: TriggerConfig) -> Result<()>

设置硬件触发模式

Source

fn export_state(&self) -> Result<Value>

导出当前配置快照 (用于持久化) 返回值使用 serde_json::Value 以兼容不同后端的配置结构

Implementors§