pub struct AsyncTcpClient<const N: usize = 9> { /* private fields */ }Expand description
Async Modbus TCP client facade.
All Modbus request methods (read_holding_registers, write_single_coil,
etc.) are available directly on this type via Deref to
[AsyncClientCore].
The constant generic parameter N is the compile-time pipeline depth
forwarded to ClientServices<_, _, N> (default 9).
Implementations§
Source§impl AsyncTcpClient<9>
impl AsyncTcpClient<9>
Sourcepub fn connect(host: &str, port: u16) -> Result<Self, AsyncError>
pub fn connect(host: &str, port: u16) -> Result<Self, AsyncError>
Creates an async TCP client connected to host:port.
Uses the default pipeline depth of 9 and a 20 ms polling interval.
Sourcepub fn connect_with_poll_interval(
host: &str,
port: u16,
poll_interval: Duration,
) -> Result<Self, AsyncError>
pub fn connect_with_poll_interval( host: &str, port: u16, poll_interval: Duration, ) -> Result<Self, AsyncError>
Creates an async TCP client connected to host:port with a custom
poll_interval.
Uses the default pipeline depth of 9.
Source§impl<const N: usize> AsyncTcpClient<N>
impl<const N: usize> AsyncTcpClient<N>
Sourcepub fn connect_with_pipeline(host: &str, port: u16) -> Result<Self, AsyncError>
pub fn connect_with_pipeline(host: &str, port: u16) -> Result<Self, AsyncError>
Creates an async TCP client with compile-time pipeline depth N.
Uses a 20 ms polling interval.
Sourcepub fn connect_with_pipeline_and_poll_interval(
host: &str,
port: u16,
poll_interval: Duration,
) -> Result<Self, AsyncError>
pub fn connect_with_pipeline_and_poll_interval( host: &str, port: u16, poll_interval: Duration, ) -> Result<Self, AsyncError>
Creates an async TCP client with compile-time pipeline depth N and a
custom poll_interval.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize = 9> !Freeze for AsyncTcpClient<N>
impl<const N: usize> RefUnwindSafe for AsyncTcpClient<N>
impl<const N: usize> Send for AsyncTcpClient<N>
impl<const N: usize> Sync for AsyncTcpClient<N>
impl<const N: usize> Unpin for AsyncTcpClient<N>
impl<const N: usize> UnsafeUnpin for AsyncTcpClient<N>
impl<const N: usize> UnwindSafe for AsyncTcpClient<N>
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