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

Method write_f64

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

Source from the content-addressed store, hash-verified

416
417 #[inline(always)]
418 pub fn write_f64(&mut self, value: f64) {
419 #[cfg(target_endian = "little")]
420 {
421 let bytes = unsafe { &*(&value as *const f64 as *const [u8; 8]) };
422 self.bf.extend_from_slice(bytes);
423 }
424 #[cfg(target_endian = "big")]
425 {
426 self.bf.extend_from_slice(&value.to_bits().to_le_bytes());
427 }
428 }
429
430 // ============ STRING (TypeId = 19) ============
431

Callers 3

test_bufferFunction · 0.80
prepare_f64_bufferFunction · 0.80
bench_write_f64Function · 0.80

Calls 1

to_bitsMethod · 0.45

Tested by 1

test_bufferFunction · 0.64