/// Returns a tuple containing the identifier and sequence number for a packet's payload.
///
/// # Arguments
/// * `payload` - Payload of a packet.
Returns a tuple containing the identifier and sequence number for a packet's payload.
Returns a tuple containing the identifier and sequence number for a packet ' s payload .
fn read_payload_id(payload: &[u8]) -> (u16, u16) {
    (
        payload[0] as u16 + ((payload[1] as u16) << 8), // identifier
        payload[2] as u16 + ((payload[3] as u16) << 8),
    ) // sequence number
}
fn read_payload_id ( payload : & [ u8 ] ) -> ( u16 , u16 ) { ( payload [ 0 ] as u16 + ( ( payload [ 1 ] as u16 ) << 8 ) , // identifier payload [ 2 ] as u16 + ( ( payload [ 3 ] as u16 ) << 8 ) , ) // sequence number }
Returns a tuple containing the identifier and sequence number for a packet's payload.
Returns a tuple containing the identifier and sequence number for a packet ' s payload .
payload
&[u8]