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

Method clone

projects/Python/proto/proto.py:2905–2913  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2903
2904 # Struct deep clone
2905 def clone(self):
2906 # Serialize the struct to the FBE stream
2907 writer = BalanceMessageModel(fbe.WriteBuffer())
2908 writer.serialize(self)
2909
2910 # Deserialize the struct from the FBE stream
2911 reader = BalanceMessageModel(fbe.ReadBuffer())
2912 reader.attach_buffer(writer.buffer)
2913 return reader.deserialize()[0]
2914
2915 def __eq__(self, other):
2916 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