/// Parse a given ACK message body and return the error code.
Parse a given ACK message body and return the error code.
Parse a given ACK message body and return the error code .
pub fn parse_ack_message(msg: &[u8]) -> Result<u32> {
    if msg.len() == mem::size_of::<u32>() {
        let ptr = msg.as_ptr() as *const u32;
        let ack = unsafe {
            u32::from_be(*ptr)
        };
        Ok(ack)
    } else {
        Err(ArrowError::other("incorrect Control Protocol ACK message length"))
    }
}
pub fn parse_ack_message ( msg : & [ u8 ] ) -> Result < u32 > { if msg . len ( ) == mem :: size_of :: < u32 > ( ) { let ptr = msg . as_ptr ( ) as * const u32 ; let ack = unsafe { u32 :: from_be ( * ptr ) } ; Ok ( ack ) } else { Err ( ArrowError :: other ( " " ) ) } }
Parse a given ACK message body and return the error code.
Parse a given ACK message body and return the error code .
msg
&[u8]