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

Method write_u32

src/bytecode/io/writer.rs:664–673  ·  view source on GitHub ↗
(&mut self, value: u32)

Source from the content-addressed store, hash-verified

662 }
663
664 pub fn write_u32(&mut self, value: u32) -> Result<usize, Error> {
665 let buf: [u8; 4] = [
666 ((value & 0xFF << 24) >> 24) as u8,
667 ((value & 0xFF << 16) >> 16) as u8,
668 ((value & 0xFF << 8) >> 8) as u8,
669 (value & 0xFF) as u8
670 ];
671
672 self.target.write(&buf)
673 }
674
675 pub fn write_u16(&mut self, value: u16) -> Result<usize, Error> {
676 let buf: [u8; 2] = [((value & 0xFF00) >> 8) as u8, (value & 0xFF) as u8];

Callers 6

write_magic_bytesMethod · 0.80
write_constantMethod · 0.80
write_attributeMethod · 0.80
write_stack_map_tableMethod · 0.80
write_instructionsMethod · 0.80
render_instructionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected