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

Method clone

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

Source from the content-addressed store, hash-verified

423
424 # Struct deep clone
425 def clone(self):
426 # Serialize the struct to the FBE stream
427 writer = OrderModel(fbe.WriteBuffer())
428 writer.serialize(self)
429
430 # Deserialize the struct from the FBE stream
431 reader = OrderModel(fbe.ReadBuffer())
432 reader.attach_buffer(writer.buffer)
433 return reader.deserialize()[0]
434
435 def __eq__(self, other):
436 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
OrderModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected