Crate kioto_serial

Crate kioto_serial 

Source
Expand description

Provide serial port I/O using tokio.

This crate provides an interface very similar to tokio-serial with a different implementation. Ideally, it can serve as a drop-in replacement.

Except on Windows (see below), the implementation uses synchronous blocking I/O to the serial port and then wraps these with asynchronous channels.

In Windows, tokio-serial is re-rexported because the approach used here, cloning the serial port handle, simply does not work. Specifically, a blocking read from the port blocks writing.

Structs§

SerialPortBuilder
Builder to open a serial port.
SerialStream
An asynchronous implementation of a serial port.

Traits§

SerialPortBuilderExt
Provides a convenience function for maximum compatibility with tokio-serial.

Functions§

new
Create a SerialPortBuilder from a device path and a baud rate.