pub fn encode_request(request: &ModbusRequest) -> Result<Vec<u8>, String>Expand description
Encode a request’s PDU.
Refuses anything parse_request would answer with an exception — a quantity outside the
function’s range, an address range past 0xFFFF — so the client never puts on the wire a
request the specification already says no to. The refusal names the reason.