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

Method clone

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

Source from the content-addressed store, hash-verified

12235
12236 # Struct deep clone
12237 def clone(self):
12238 # Serialize the struct to the FBE stream
12239 writer = StructSetModel(fbe.WriteBuffer())
12240 writer.serialize(self)
12241
12242 # Deserialize the struct from the FBE stream
12243 reader = StructSetModel(fbe.ReadBuffer())
12244 reader.attach_buffer(writer.buffer)
12245 return reader.deserialize()[0]
12246
12247 def __eq__(self, other):
12248 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
StructSetModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected