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

Method clone

projects/Python/proto/protoex.py:1251–1259  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1249
1250 # Struct deep clone
1251 def clone(self):
1252 # Serialize the struct to the FBE stream
1253 writer = BalanceModel(fbe.WriteBuffer())
1254 writer.serialize(self)
1255
1256 # Deserialize the struct from the FBE stream
1257 reader = BalanceModel(fbe.ReadBuffer())
1258 reader.attach_buffer(writer.buffer)
1259 return reader.deserialize()[0]
1260
1261 def __eq__(self, other):
1262 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
BalanceModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected