Struct serial::OpenOptions
[-] [+]
[src]
pub struct OpenOptions(_);
Options and flags which can be used to configure how a serial port is opened.
Methods
impl OpenOptions
fn new() -> OpenOptions
[-]
Creates a blank net set of options ready for configuration.
All options are initially set to false.
fn read(&mut self, read: bool) -> &mut OpenOptions
[-]
Set the option for read access.
This option, when true, will indicate that the serial port should be read-able when opened.
fn write(&mut self, write: bool) -> &mut OpenOptions
[-]
Set the option for write access.
This option, when true, will indicate that the serial port should be write-able when opened.
fn open<P: ?Sized>(&self, port: &P) -> Result<SerialPort> where P: AsRef<Path>
[-]
Opens a serial port in "raw" mode with the specified read/write permissions.
If no permission was specified, the port will be opened in read only mode.