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

Method clone

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

Source from the content-addressed store, hash-verified

10163
10164 # Struct deep clone
10165 def clone(self):
10166 # Serialize the struct to the FBE stream
10167 writer = StructVectorModel(fbe.WriteBuffer())
10168 writer.serialize(self)
10169
10170 # Deserialize the struct from the FBE stream
10171 reader = StructVectorModel(fbe.ReadBuffer())
10172 reader.attach_buffer(writer.buffer)
10173 return reader.deserialize()[0]
10174
10175 def __eq__(self, other):
10176 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
StructVectorModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected