pub fn int64(bits: &Bits) -> i64Expand description
Converts up to the first 64 bits of a bit string to a 64 bit signed integer.
If the length of the the bit string is less than 64, the result is sign-extended to 64 bits.
ยงExample
let bits = Bits::new([0x10, 0x32, 0x54, 0x76]);
let long = bits_as::int64(&bits);
assert_eq!(long, 0x0000000076543210);
let bits = Bits::from([0x10, 0x32, 0x54, 0x76]);
let long = bits_as::int64(&bits);
assert_eq!(long, 0xFFFFFFFFF6543210u64 as i64);