MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / clone

Method clone

projects/Python/proto/test.py:876–884  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

874
875 # Struct deep clone
876 def clone(self):
877 # Serialize the struct to the FBE stream
878 writer = StructSimpleModel(fbe.WriteBuffer())
879 writer.serialize(self)
880
881 # Deserialize the struct from the FBE stream
882 reader = StructSimpleModel(fbe.ReadBuffer())
883 reader.attach_buffer(writer.buffer)
884 return reader.deserialize()[0]
885
886 def __eq__(self, other):
887 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
StructSimpleModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected