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

Method fory_write_data

rust/fory-core/src/serializer/string.rs:36–41  ·  view source on GitHub ↗
(&self, context: &mut WriteContext)

Source from the content-addressed store, hash-verified

34impl Serializer for String {
35 #[inline(always)]
36 fn fory_write_data(&self, context: &mut WriteContext) -> Result<(), Error> {
37 let bitor = (self.len() as i32 as u64) << 2 | StrEncoding::Utf8 as u64;
38 context.writer.write_var_u36_small(bitor);
39 context.writer.write_utf8_string(self);
40 Ok(())
41 }
42
43 #[inline(always)]
44 fn fory_read_data(context: &mut ReadContext) -> Result<Self, Error> {

Callers

nothing calls this directly

Calls 3

lenMethod · 0.80
write_var_u36_smallMethod · 0.80
write_utf8_stringMethod · 0.80

Tested by

no test coverage detected