pub struct ModbusTcpTransport { /* private fields */ }Implementations§
Source§impl ModbusTcpTransport
impl ModbusTcpTransport
pub async fn connect<A: ToSocketAddrs>(addr: A) -> Result<Self, DataLinkError>
pub fn from_stream(stream: TcpStream) -> Self
Trait Implementations§
Source§impl DataLink for ModbusTcpTransport
impl DataLink for ModbusTcpTransport
Source§fn exchange<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
unit_id: u8,
request_pdu: &'life1 [u8],
response_pdu: &'life2 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, DataLinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exchange<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
unit_id: u8,
request_pdu: &'life1 [u8],
response_pdu: &'life2 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, DataLinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a request PDU to a unit and write the response PDU into
response_pdu. Read moreAuto Trait Implementations§
impl Freeze for ModbusTcpTransport
impl !RefUnwindSafe for ModbusTcpTransport
impl Send for ModbusTcpTransport
impl Sync for ModbusTcpTransport
impl Unpin for ModbusTcpTransport
impl UnsafeUnpin for ModbusTcpTransport
impl !UnwindSafe for ModbusTcpTransport
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