[][src]Function cookie_factory::le_u24

pub fn le_u24<W: Write>(i: u32) -> impl SerializeFn<W>

Writes the lower 24 bit of an u32 in little endian byte order to the output

use cookie_factory::le_u24;

let mut buf = [0u8; 100];

{
  let buf = le_u24(1u32)(&mut buf[..]).unwrap();
  assert_eq!(buf.len(), 100 - 3);
}

assert_eq!(&buf[..3], &[1u8, 0u8, 0u8][..]);