[−][src]Function cookie_factory::be_i64
pub fn be_i64<W: Write>(i: i64) -> impl SerializeFn<W>
Writes an i64
in big endian byte order to the output
use cookie_factory::{gen, be_i64}; let mut buf = [0u8; 100]; { let (buf, pos) = gen(be_i64(1i64), &mut buf[..]).unwrap(); assert_eq!(pos, 8); assert_eq!(buf.len(), 100 - 8); } assert_eq!(&buf[..8], &[0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8][..]);