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

Method clone

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

Source from the content-addressed store, hash-verified

1678
1679 # Struct deep clone
1680 def clone(self):
1681 # Serialize the struct to the FBE stream
1682 writer = AccountModel(fbe.WriteBuffer())
1683 writer.serialize(self)
1684
1685 # Deserialize the struct from the FBE stream
1686 reader = AccountModel(fbe.ReadBuffer())
1687 reader.attach_buffer(writer.buffer)
1688 return reader.deserialize()[0]
1689
1690 def __eq__(self, other):
1691 if not isinstance(self, other.__class__):

Callers 1

test_cloneMethod · 0.95

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
AccountModelClass · 0.70
attach_bufferMethod · 0.45

Tested by 1

test_cloneMethod · 0.76