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

Method clone

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

Source from the content-addressed store, hash-verified

2535
2536 # Struct deep clone
2537 def clone(self):
2538 # Serialize the struct to the FBE stream
2539 writer = OrderMessageModel(fbe.WriteBuffer())
2540 writer.serialize(self)
2541
2542 # Deserialize the struct from the FBE stream
2543 reader = OrderMessageModel(fbe.ReadBuffer())
2544 reader.attach_buffer(writer.buffer)
2545 return reader.deserialize()[0]
2546
2547 def __eq__(self, other):
2548 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