pub fn pdu_len(&self) -> usize {
        use Request::*;
        match *self {
            ReadCoils(_, _)
            | ReadDiscreteInputs(_, _)
            | ReadInputRegisters(_, _)
            | ReadHoldingRegisters(_, _)
            | WriteSingleRegister(_, _)
            | WriteSingleCoil(_, _) => 5,
            WriteMultipleCoils(_, coils) => 6 + coils.packed_len(),
            WriteMultipleRegisters(_, words) => 6 + words.data.len(),
            ReadWriteMultipleRegisters(_, _, _, words) => 10 + words.data.len(),
            Custom(_, data) => 1 + data.len(),
            #[cfg(feature = "rtu")]
            _ => unimplemented!(), // TODO
        }
    }
/// Number of bytes required for a serialized PDU frame.
Number of bytes required for a serialized PDU frame.
Number of bytes required for a serialized PDU frame .
pub fn pdu_len(&self) -> usize {
        use Request::*;
        match *self {
            ReadCoils(_, _)
            | ReadDiscreteInputs(_, _)
            | ReadInputRegisters(_, _)
            | ReadHoldingRegisters(_, _)
            | WriteSingleRegister(_, _)
            | WriteSingleCoil(_, _) => 5,
            WriteMultipleCoils(_, coils) => 6 + coils.packed_len(),
            WriteMultipleRegisters(_, words) => 6 + words.data.len(),
            ReadWriteMultipleRegisters(_, _, _, words) => 10 + words.data.len(),
            Custom(_, data) => 1 + data.len(),
            #[cfg(feature = "rtu")]
            _ => unimplemented!(), // TODO
        }
    }
pub fn pdu_len ( & self ) -> usize { use Request :: * ; match * self { ReadCoils ( _ , _ ) | ReadDiscreteInputs ( _ , _ ) | ReadInputRegisters ( _ , _ ) | ReadHoldingRegisters ( _ , _ ) | WriteSingleRegister ( _ , _ ) | WriteSingleCoil ( _ , _ ) => 5 , WriteMultipleCoils ( _ , coils ) => 6 + coils . packed_len ( ) , WriteMultipleRegisters ( _ , words ) => 6 + words . data . len ( ) , ReadWriteMultipleRegisters ( _ , _ , _ , words ) => 10 + words . data . len ( ) , Custom ( _ , data ) => 1 + data . len ( ) , # [ cfg ( feature " " ) ] _ => unimplemented ! ( ) , // TODO } }
Number of bytes required for a serialized PDU frame.
Number of bytes required for a serialized PDU frame .
&self
&self