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

Method clone

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

Source from the content-addressed store, hash-verified

3505
3506 # Struct deep clone
3507 def clone(self):
3508 # Serialize the struct to the FBE stream
3509 writer = AccountMessageModel(fbe.WriteBuffer())
3510 writer.serialize(self)
3511
3512 # Deserialize the struct from the FBE stream
3513 reader = AccountMessageModel(fbe.ReadBuffer())
3514 reader.attach_buffer(writer.buffer)
3515 return reader.deserialize()[0]
3516
3517 def __eq__(self, other):
3518 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
AccountMessageModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected