pub fn pdu_len(&self) -> usize {
        use Response::*;
        match *self {
            ReadCoils(coils) | ReadDiscreteInputs(coils) => 2 + coils.packed_len(),
            WriteSingleCoil(_) => 3,
            WriteMultipleCoils(_, _) | WriteMultipleRegisters(_, _) | WriteSingleRegister(_, _) => {
                5
            }
            ReadInputRegisters(words)
            | ReadHoldingRegisters(words)
            | ReadWriteMultipleRegisters(words) => 2 + words.len() * 2,
            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 Response::*;
        match *self {
            ReadCoils(coils) | ReadDiscreteInputs(coils) => 2 + coils.packed_len(),
            WriteSingleCoil(_) => 3,
            WriteMultipleCoils(_, _) | WriteMultipleRegisters(_, _) | WriteSingleRegister(_, _) => {
                5
            }
            ReadInputRegisters(words)
            | ReadHoldingRegisters(words)
            | ReadWriteMultipleRegisters(words) => 2 + words.len() * 2,
            Custom(_, data) => 1 + data.len(),
            #[cfg(feature = "rtu")]
            _ => unimplemented!(), // TODO
        }
    }
pub fn pdu_len ( & self ) -> usize { use Response :: * ; match * self { ReadCoils ( coils ) | ReadDiscreteInputs ( coils ) => 2 + coils . packed_len ( ) , WriteSingleCoil ( _ ) => 3 , WriteMultipleCoils ( _ , _ ) | WriteMultipleRegisters ( _ , _ ) | WriteSingleRegister ( _ , _ ) => { 5 } ReadInputRegisters ( words ) | ReadHoldingRegisters ( words ) | ReadWriteMultipleRegisters ( words ) => 2 + words . len ( ) * 2 , 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