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

Method clone

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

Source from the content-addressed store, hash-verified

3388
3389 # Struct deep clone
3390 def clone(self):
3391 # Serialize the struct to the FBE stream
3392 writer = AccountMessageModel(fbe.WriteBuffer())
3393 writer.serialize(self)
3394
3395 # Deserialize the struct from the FBE stream
3396 reader = AccountMessageModel(fbe.ReadBuffer())
3397 reader.attach_buffer(writer.buffer)
3398 return reader.deserialize()[0]
3399
3400 def __eq__(self, other):
3401 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
AccountMessageModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected