Trait serial2::IntoSettings [−][src]
pub trait IntoSettings {
fn apply_to_settings(self, settings: &mut Settings) -> Result<()>;
}
Expand description
Trait for objects that can configure a serial port.
Usually, you can simply pass a u32
when an implementor of this trait is required.
That uses the u32
to configure the baud rate,
sets the char size to 8 bits, sets one stop bit, disables parity checks and flow control.
If you need more control, you can use a Fn(Settings) -> std::io::Result<Settings>
.
If you want to open the serial port without modifying any settings, you can use KeepSettings
.