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

Function buffer_callback

python/pyfory/tests/test_cross_language.py:683–690  ·  view source on GitHub ↗
(binary_object)

Source from the content-addressed store, hash-verified

681 counter = 0
682
683 def buffer_callback(binary_object):
684 nonlocal counter
685 counter += 1
686 if counter % 2 == 0:
687 buffer_objects.append(binary_object)
688 return False
689 else:
690 return True
691
692 serialized = fory.serialize(obj, buffer_callback=buffer_callback)
693 # in_band_bytes size may be different because it may contain language-specific meta.

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected