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

Method clone

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

Source from the content-addressed store, hash-verified

3020
3021 # Struct deep clone
3022 def clone(self):
3023 # Serialize the struct to the FBE stream
3024 writer = BalanceMessageModel(fbe.WriteBuffer())
3025 writer.serialize(self)
3026
3027 # Deserialize the struct from the FBE stream
3028 reader = BalanceMessageModel(fbe.ReadBuffer())
3029 reader.attach_buffer(writer.buffer)
3030 return reader.deserialize()[0]
3031
3032 def __eq__(self, other):
3033 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
BalanceMessageModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected