[−][src]Crate serialport
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 and as such is part of the prelude
. The open*()
and available_ports()
functions
in the root provide cross-platform functionality.
For platform-specific functionaly, 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 open*()
functions will return the platform-specific port object
which allows access to platform-specific functionality.
Structs
COMPort | A serial port implementation for Windows COM ports |
Error | An error type for serial port operations |
SerialPortBuilder | A struct containing all serial port settings |
SerialPortInfo | A device-independent implementation of serial port information |
UsbPortInfo | Contains all possible USB information about a |
Enums
ClearBuffer | Specifies which buffer or buffers to purge when calling |
DataBits | Number of bits per character |
ErrorKind | Categories of errors that can occur when interacting with serial ports |
FlowControl | Flow control modes |
Parity | Parity checking modes |
SerialPortType | The physical type of a |
StopBits | Number of stop bits |
Traits
SerialPort | A trait for serial port devices |
Functions
available_ports | Returns a list of all serial ports on system |
new | Construct a builder of |
Type Definitions
Result | A type for results generated by interacting with serial ports |