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

Method write_u64

src/bytecode/io/writer.rs:649–662  ·  view source on GitHub ↗
(&mut self, value: u64)

Source from the content-addressed store, hash-verified

647 }
648
649 pub fn write_u64(&mut self, value: u64) -> Result<usize, Error> {
650 let buf: [u8; 8] = [
651 ((value & 0xFF << 56) >> 56) as u8,
652 ((value & 0xFF << 48) >> 48) as u8,
653 ((value & 0xFF << 40) >> 40) as u8,
654 ((value & 0xFF << 32) >> 32) as u8,
655 ((value & 0xFF << 24) >> 24) as u8,
656 ((value & 0xFF << 16) >> 16) as u8,
657 ((value & 0xFF << 8) >> 8) as u8,
658 (value & 0xFF) as u8
659 ];
660
661 self.target.write(&buf)
662 }
663
664 pub fn write_u32(&mut self, value: u32) -> Result<usize, Error> {
665 let buf: [u8; 4] = [

Callers 1

write_constantMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected