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

Method clone

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

Source from the content-addressed store, hash-verified

1125
1126 # Struct deep clone
1127 def clone(self):
1128 # Serialize the struct to the FBE stream
1129 writer = BalanceModel(fbe.WriteBuffer())
1130 writer.serialize(self)
1131
1132 # Deserialize the struct from the FBE stream
1133 reader = BalanceModel(fbe.ReadBuffer())
1134 reader.attach_buffer(writer.buffer)
1135 return reader.deserialize()[0]
1136
1137 def __eq__(self, other):
1138 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