MCPcopy Create free account
hub / github.com/cretz/stackparam / read_u64

Method read_u64

src/bytecode/io/reader.rs:876–895  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

874 }
875
876 pub fn read_u64(&mut self) -> Result<u64, Error> {
877 let mut buf: [u8; 8] = [0; 8];
878
879 match self.source.read_exact(&mut buf) {
880 Ok(_) => {
881 self.position += 8;
882
883 Ok(
884 ((buf[0] as u64) << 56) +
885 ((buf[1] as u64) << 48) +
886 ((buf[2] as u64) << 40) +
887 ((buf[3] as u64) << 32) +
888 ((buf[4] as u64) << 24) +
889 ((buf[5] as u64) << 16) +
890 ((buf[6] as u64) << 8) +
891 buf[7] as u64)
892 },
893 Err(err) => Err(err)
894 }
895 }
896
897 #[allow(dead_code)]
898 pub fn get_u64(&mut self) -> u64 {

Callers 2

read_constantMethod · 0.80
get_u64Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected