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

Method write_bytes_from_ptr

rust/fory-core/src/buffer.rs:87–92  ·  view source on GitHub ↗
(&mut self, ptr: *const u8, len: usize)

Source from the content-addressed store, hash-verified

85
86 #[inline(always)]
87 pub(crate) unsafe fn write_bytes_from_ptr(&mut self, ptr: *const u8, len: usize) {
88 let offset = self.bf.len();
89 self.bf.reserve(len);
90 std::ptr::copy_nonoverlapping(ptr, self.bf.as_mut_ptr().add(offset), len);
91 self.bf.set_len(offset + len);
92 }
93
94 // ============ BOOL (TypeId = 1) ============
95

Callers 1

fory_write_dataFunction · 0.80

Calls 3

lenMethod · 0.80
addMethod · 0.65
reserveMethod · 0.45

Tested by

no test coverage detected