Expand description
Byte-oriented transport boundaries for vendor HID reports.
厂商 HID 报文的字节级传输边界。
§Example / 示例
Validate a report exchange without opening any hardware. 不打开硬件即可验证一次报文交换。
use razers_transport::{ReplayStep, ReplayTransport, ReportIo};
let mut transport = ReplayTransport::new([
ReplayStep::SetFeature { report_id: 0, payload: vec![1, 2] },
ReplayStep::GetFeature { report_id: 0, response: vec![3, 4] },
]);
transport.set_feature(0, &[1, 2])?;
let mut response = [0; 2];
assert_eq!(transport.get_feature(0, &mut response)?, 2);
assert_eq!(response, [3, 4]);
transport.verify_complete()?;Structs§
- Replay
Transport - A strict in-memory transport for protocol tests and captured golden traces.
Enums§
- Replay
Step - One expected operation in a deterministic, hardware-free transport trace.
- Transport
Error
Traits§
- Report
Io - Synchronous, byte-level report I/O owned by one serialized connection worker.