Struct tokio_modbus::client::Context
source · pub struct Context { /* private fields */ }
Expand description
Asynchronous Modbus client context
Implementations§
Trait Implementations§
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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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>, Error>> + 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<(), Error>> + 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<(), Error>> + 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<(), Error>> + 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<(), Error>> + 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,
data: u16
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn write_single_register<'a, 'async_trait>( &'a mut self, addr: Address, data: u16 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait,
Write a single holding register (0x06)
Auto Trait Implementations§
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