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

Method clone

projects/Python/proto/test.py:3600–3608  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3598
3599 # Struct deep clone
3600 def clone(self):
3601 # Serialize the struct to the FBE stream
3602 writer = StructOptionalModel(fbe.WriteBuffer())
3603 writer.serialize(self)
3604
3605 # Deserialize the struct from the FBE stream
3606 reader = StructOptionalModel(fbe.ReadBuffer())
3607 reader.attach_buffer(writer.buffer)
3608 return reader.deserialize()[0]
3609
3610 def __eq__(self, other):
3611 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
StructOptionalModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected