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

Method clone

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

Source from the content-addressed store, hash-verified

13991
13992 # Struct deep clone
13993 def clone(self):
13994 # Serialize the struct to the FBE stream
13995 writer = StructHashModel(fbe.WriteBuffer())
13996 writer.serialize(self)
13997
13998 # Deserialize the struct from the FBE stream
13999 reader = StructHashModel(fbe.ReadBuffer())
14000 reader.attach_buffer(writer.buffer)
14001 return reader.deserialize()[0]
14002
14003 def __eq__(self, other):
14004 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
StructHashModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected