MCPcopy Create free account
hub / github.com/apache/fory / write_u32

Method write_u32

rust/fory-core/src/buffer.rs:191–201  ·  view source on GitHub ↗
(&mut self, value: u32)

Source from the content-addressed store, hash-verified

189
190 #[inline(always)]
191 pub fn write_u32(&mut self, value: u32) {
192 #[cfg(target_endian = "little")]
193 {
194 let bytes = unsafe { &*(&value as *const u32 as *const [u8; 4]) };
195 self.bf.extend_from_slice(bytes);
196 }
197 #[cfg(target_endian = "big")]
198 {
199 self.bf.extend_from_slice(&value.to_le_bytes());
200 }
201 }
202
203 // ============ VAR_UINT32 (TypeId = 12) ============
204

Callers 7

write_i32Method · 0.80
_write_var_u32Method · 0.80
_write_var_u64Method · 0.80
write_tagged_u64Method · 0.80
write_var_u36_smallMethod · 0.80
write_typed_payloadFunction · 0.80
fory_write_dataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected