/// Write a u32 into a vector, which must be 4 bytes long. The value is written in big-endian
/// format.
Write a u32 into a vector, which must be 4 bytes long. The value is written in big-endian
format.
Write a u32 into a vector which must be 4 bytes long . The value is written in big - endian format .
pub fn write_u32_be(dst: &mut [u8], mut input: u32) {
    assert!(dst.len() == 4);
    input = input.to_be();
    unsafe {
        let tmp = &input as *const _ as *const u8;
        ptr::copy_nonoverlapping(tmp, dst.get_unchecked_mut(0), 4);
    }
}
pub fn write_u32_be ( dst : & mut [ u8 ] , mut input : u32 ) { assert ! ( dst len ( ) 4 ) ; input = input . to_be ( ) ; unsafe { let tmp = & input as * const _ as * const u8 ; ptr :: copy_nonoverlapping ( tmp , dst . get_unchecked_mut ( 0 ) , 4 ) ; } }
Write a u32 into a vector, which must be 4 bytes long.
Write a u32 into a vector which must be 4 bytes long .
dst
&mut [u8]
input
u32