pub struct Context { /* private fields */ }
Expand description
Asynchronous Modbus client context
Trait Implementations§
Source§impl Client for Context
impl Client for Context
Source§impl Reader for Context
impl Reader for Context
Source§fn read_coils<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_coils<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Read multiple coils (0x01)
Source§fn read_discrete_inputs<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_discrete_inputs<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Read multiple discrete inputs (0x02)
Source§fn read_input_registers<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_input_registers<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Read multiple input registers (0x04)
Source§fn read_holding_registers<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_holding_registers<'a, 'async_trait>(
&'a mut self,
addr: Address,
cnt: Quantity,
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Read multiple holding registers (0x03)
Source§fn read_write_multiple_registers<'a, 'life0, 'async_trait>(
&'a mut self,
read_addr: Address,
read_count: Quantity,
write_addr: Address,
write_data: &'life0 [u16],
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn read_write_multiple_registers<'a, 'life0, 'async_trait>(
&'a mut self,
read_addr: Address,
read_count: Quantity,
write_addr: Address,
write_data: &'life0 [u16],
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Read and write multiple holding registers (0x17) Read more
Source§impl SlaveContext for Context
impl SlaveContext for Context
Source§impl Writer for Context
impl Writer for Context
Source§fn write_single_coil<'a, 'async_trait>(
&'a mut self,
addr: Address,
coil: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn write_single_coil<'a, 'async_trait>(
&'a mut self,
addr: Address,
coil: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Write a single coil (0x05)
Source§fn write_multiple_coils<'a, 'life0, 'async_trait>(
&'a mut self,
addr: Address,
coils: &'life0 [bool],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn write_multiple_coils<'a, 'life0, 'async_trait>(
&'a mut self,
addr: Address,
coils: &'life0 [bool],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Write multiple coils (0x0F)
Source§fn write_single_register<'a, 'async_trait>(
&'a mut self,
addr: Address,
word: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn write_single_register<'a, 'async_trait>(
&'a mut self,
addr: Address,
word: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Write a single holding register (0x06)
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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