Skip to main content

Module device

Module device 

Source
Expand description

Asynchronous serial device abstraction and default serialport backend.

The SerialDevice trait is the narrow runtime contract every backend — real hardware, in-memory mock, pseudo-terminal loopback — must satisfy. The rest of rtcom-core (event bus, session orchestrator, mappers) never references a concrete serial implementation, which keeps testing and future backends (e.g. a TCP passthrough, a simulated device) cheap.

SerialPortDevice is the stock implementation, layered on top of tokio_serial so reads and writes are driven by the tokio reactor rather than a per-port blocking thread.

Structs§

SerialPortDevice
Default SerialDevice backed by tokio_serial::SerialStream.

Traits§

SerialDevice
Runtime contract for every serial backend used by rtcom-core.