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

Method write_head

rust/fory-core/src/fory.rs:941–950  ·  view source on GitHub ↗
(&self, writer: &mut Writer)

Source from the content-addressed store, hash-verified

939 /// Writes the serialization header to the writer.
940 #[inline(always)]
941 pub fn write_head<T: Serializer>(&self, writer: &mut Writer) {
942 const HEAD_SIZE: usize = 10;
943 writer.reserve(T::fory_reserved_space() + SIZE_OF_REF_AND_TYPE + HEAD_SIZE);
944 let bitmap = if self.config.xlang {
945 IS_CROSS_LANGUAGE_FLAG
946 } else {
947 0
948 };
949 writer.write_u8(bitmap);
950 }
951
952 /// Deserializes data from a byte slice into a value of type `T`.
953 ///

Callers

nothing calls this directly

Calls 3

fory_reserved_spaceFunction · 0.85
write_u8Method · 0.80
reserveMethod · 0.45

Tested by

no test coverage detected