fn from_bytes(data: &[u8]) -> ControlMessageHeader {
        assert_eq!(data.len(), mem::size_of::<ControlMessageHeader>());
        let ptr    = data.as_ptr() as *const ControlMessageHeader;
        let header = unsafe { &*ptr };
        
        ControlMessageHeader {
            msg_id:   u16::from_be(header.msg_id),
            msg_type: u16::from_be(header.msg_type)
        }
    }
/// Deserialize a Control Message header.
Deserialize a Control Message header.
Deserialize a Control Message header .
fn from_bytes(data: &[u8]) -> ControlMessageHeader {
        assert_eq!(data.len(), mem::size_of::<ControlMessageHeader>());
        let ptr    = data.as_ptr() as *const ControlMessageHeader;
        let header = unsafe { &*ptr };
        ControlMessageHeader {
            msg_id:   u16::from_be(header.msg_id),
            msg_type: u16::from_be(header.msg_type)
        }
    }
fn from_bytes ( data : & [ u8 ] ) -> ControlMessageHeader { assert_eq ! ( data len ( ) mem size_of ControlMessageHeader ( ) ) ; let ptr = data . as_ptr ( ) as * const ControlMessageHeader ; let header = unsafe { & * ptr } ; ControlMessageHeader { msg_id : u16 :: from_be ( header . msg_id ) , msg_type : u16 :: from_be ( header . msg_type ) } }
Deserialize a Control Message header.
Deserialize a Control Message header .
data
&[u8]
data
&[u8]