Expand description
serialport-rs is a cross-platform serial port library.
The goal of this library is to expose a cross-platform and platform-specific API for enumerating
and using blocking I/O with serial ports. This library exposes a similar API to that provided
by Qt’s QSerialPort library.
§Feature Overview
The library has been organized such that there is a high-level SerialPort trait that provides
a cross-platform API for accessing serial ports. This is the preferred method of interacting
with ports. The SerialPort::new().open*() and available_ports() functions in the root
provide cross-platform functionality.
For platform-specific functionality, this crate is split into a posix and windows API with
corresponding TTYPort and COMPort structs (that both implement the SerialPort trait).
Using the platform-specific SerialPort::new().open*() functions will return the
platform-specific port object which allows access to platform-specific functionality.
Structs§
- Error
- An error type for serial port operations
- Serial
Port Builder - A struct containing all serial port settings
- Serial
Port Info - A device-independent implementation of serial port information
- TTYPort
Unix - A serial port implementation for POSIX TTY ports
- UsbPort
Info - Contains all possible USB information about a
SerialPort
Enums§
- Break
Duration Unix - Specifies the duration of a transmission break
- Clear
Buffer - Specifies which buffer or buffers to purge when calling
clear - Data
Bits - Number of bits per character
- Error
Kind - Categories of errors that can occur when interacting with serial ports
- Flow
Control - Flow control modes
- Parity
- Parity checking modes
- Serial
Port Type - The physical type of a
SerialPort - Stop
Bits - Number of stop bits
Traits§
- Serial
Port - A trait for serial port devices
Functions§
- available_
ports - Returns a list of all serial ports on system
- new
- Construct a builder of
SerialPortobjects
Type Aliases§
- Result
- A type for results generated by interacting with serial ports