#[repr(C)]pub struct CommTimeouts {
pub read_interval_timeout: u32,
pub read_total_timeout_multiplier: u32,
pub read_total_timeout_constant: u32,
pub write_total_timeout_multiplier: u32,
pub write_total_timeout_constant: u32,
}
Available on crate feature
windows
only.Expand description
Windows specific timeouts for a serial port.
Use crate::SerialPort::get_windows_timeouts()
to get the timeouts,
and crate::SerialPort::set_windows_timeouts()
to apply them.
For more information, see: https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-commtimeouts
Note that changing the read timeouts can easily lead to the serial port timing out on every read unless you are very careful. Please read the whole MSDN article about serial port timeouts linked above, including the remarks.
You are strongly suggested to use crate::SerialPort::set_read_timeout()
and crate::SerialPort::set_write_timeout()
instead.
Fields§
§read_interval_timeout: u32
§read_total_timeout_multiplier: u32
§read_total_timeout_constant: u32
§write_total_timeout_multiplier: u32
§write_total_timeout_constant: u32
Auto Trait Implementations§
impl Freeze for CommTimeouts
impl RefUnwindSafe for CommTimeouts
impl Send for CommTimeouts
impl Sync for CommTimeouts
impl Unpin for CommTimeouts
impl UnwindSafe for CommTimeouts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more