Skip to main content

Module command

Module command 

Source
Expand description

Client command types for the async task channel.

This module defines the two enums used to communicate with the background tokio task that owns the transport:

  • ClientRequest — the user-facing operation parameters, one variant per Modbus function code, carrying only the values the caller supplies. The task assigns the transaction id internally.
  • TaskCommand — the full envelope sent over the mpsc channel, which wraps a ClientRequest together with the oneshot reply sender, or represents a connection request.

Shutdown is signalled implicitly by dropping the mpsc::Sender end of the channel; no explicit Shutdown variant is needed.

Enums§

ClientRequest
User-supplied parameters for a single Modbus request.