pub struct RtuConfig {
pub device: String,
pub baud_rate: u32,
pub data_bits: DataBits,
pub parity: Parity,
pub stop_bits: StopBits,
pub rts_type: RtsType,
pub rts_delay_us: u64,
pub flush_after_write: bool,
pub transaction_timeout: Duration,
pub serial_timeout: Duration,
pub max_frame_size: u64,
}
Fields§
§device: String
§baud_rate: u32
§data_bits: DataBits
§parity: Parity
§stop_bits: StopBits
§rts_type: RtsType
Flow control settings for the serial port
rts_delay_us: u64
§flush_after_write: bool
Whether to flush the serial port after writing
transaction_timeout: Duration
Timeout for the entire transaction (request + response)
serial_timeout: Duration
Timeout for individual read/write operations on serial port
max_frame_size: u64
Maximum size of the request/response buffer
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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