Struct serial::SerialPort
[-] [+]
[src]
pub struct SerialPort(_);
A serial device
Methods
impl SerialPort
fn open(port: &Path) -> Result<SerialPort>
[-]
Opens a serial port in "raw" mode with read-only permission
fn baud_rate(&self) -> Result<(BaudRate, BaudRate)>
[-]
Returns the input and output baud rates
fn blocking_mode(&self) -> Result<BlockingMode>
[-]
Returns the blocking mode used by the device
fn data_bits(&self) -> Result<DataBits>
[-]
Returns the number of data bits used per character
fn flow_control(&self) -> Result<FlowControl>
[-]
Returns the flow control used by the device
fn parity(&self) -> Result<Parity>
[-]
Returns the bit parity used by the device
fn set_baud_rate(&mut self, direction: Direction, rate: BaudRate) -> Result<()>
[-]
Changes the baud rate of the input/output or both directions
fn set_blocking_mode(&mut self, mode: BlockingMode) -> Result<()>
[-]
Changes the blocking mode used by the device
fn set_data_bits(&mut self, bits: DataBits) -> Result<()>
[-]
Changes the number of data bits per character
fn set_flow_control(&mut self, flow: FlowControl) -> Result<()>
[-]
Changes the flow control used by the device
fn set_parity(&mut self, parity: Parity) -> Result<()>
[-]
Changes the bit parity used by the device
fn set_stop_bits(&mut self, bits: StopBits) -> Result<()>
[-]
Changes the number of stop bits per character
fn stop_bits(&self) -> Result<StopBits>
[-]
Returns the number of stop bits per character