pub struct AsyncMaster { /* private fields */ }Expand description
Async Modbus RTU master that honors Modbus idle timing rules between frames.
Implementations§
Source§impl AsyncMaster
impl AsyncMaster
Sourcepub fn new_rs485(path: &str, baud_rate: u32) -> Result<Self>
pub fn new_rs485(path: &str, baud_rate: u32) -> Result<Self>
Builds a master configured for an RS-485 style setup (8N1, async I/O).
The port timeout is pinned to the Modbus RTU silent interval (T3.5) for the supplied baud rate so that the reader can detect frame boundaries.
Sourcepub fn set_baudrate(&mut self, baud_rate: u32) -> Result<()>
pub fn set_baudrate(&mut self, baud_rate: u32) -> Result<()>
Updates the serial baud rate and matching Modbus idle timeout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncMaster
impl !RefUnwindSafe for AsyncMaster
impl Send for AsyncMaster
impl Sync for AsyncMaster
impl Unpin for AsyncMaster
impl !UnwindSafe for AsyncMaster
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