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

Method clone

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

Source from the content-addressed store, hash-verified

2418
2419 # Struct deep clone
2420 def clone(self):
2421 # Serialize the struct to the FBE stream
2422 writer = OrderMessageModel(fbe.WriteBuffer())
2423 writer.serialize(self)
2424
2425 # Deserialize the struct from the FBE stream
2426 reader = OrderMessageModel(fbe.ReadBuffer())
2427 reader.attach_buffer(writer.buffer)
2428 return reader.deserialize()[0]
2429
2430 def __eq__(self, other):
2431 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
OrderMessageModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected