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

Method write_usize

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

Source from the content-addressed store, hash-verified

470
471 #[inline(always)]
472 pub fn write_usize(&mut self, value: usize) {
473 const SIZE: usize = std::mem::size_of::<usize>();
474 match SIZE {
475 2 => self.write_u16(value as u16),
476 4 => self.write_var_u32(value as u32),
477 8 => self.write_var_u64(value as u64),
478 _ => unreachable!("unsupported usize size"),
479 }
480 }
481
482 // ============ Other helper methods ============
483

Callers

nothing calls this directly

Calls 3

write_u16Method · 0.80
write_var_u32Method · 0.80
write_var_u64Method · 0.80

Tested by

no test coverage detected