pub trait IntoSettings {
    fn apply_to_settings(self, settings: &mut Settings) -> Result<()>;
Expand description

Trait for objects that can configure a serial port.

The simplest option is to pass a u32, which is used to set the baud rate of the port. That will also configure a character size of 8 bits with 1 stop bit, and it disables paritity checks and flow control.

For more control, it is possible to pass a Fn(Settings) -> std::io::Result<Settings>.

To open a serial port without modifying any settings, pass KeepSettings.

Required Methods

Apply the configuration to an existing Settings struct.

Implementations on Foreign Types