pub fn write_be<T: Writeable>(v: &T, buffer: &mut [u8])
Expand description
write a number to stream as big-endian.
panics if buffer does not contain enough space.
use byte_io::*;
let mut buf = [0u8;8];
write_be(&1u64, &mut buf);
assert_eq!(buf, [0,0,0,0,0,0,0,1]);