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

Method clone

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

Source from the content-addressed store, hash-verified

396
397 # Struct deep clone
398 def clone(self):
399 # Serialize the struct to the FBE stream
400 writer = OrderModel(fbe.WriteBuffer())
401 writer.serialize(self)
402
403 # Deserialize the struct from the FBE stream
404 reader = OrderModel(fbe.ReadBuffer())
405 reader.attach_buffer(writer.buffer)
406 return reader.deserialize()[0]
407
408 def __eq__(self, other):
409 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