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

Method clone

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

Source from the content-addressed store, hash-verified

1795
1796 # Struct deep clone
1797 def clone(self):
1798 # Serialize the struct to the FBE stream
1799 writer = AccountModel(fbe.WriteBuffer())
1800 writer.serialize(self)
1801
1802 # Deserialize the struct from the FBE stream
1803 reader = AccountModel(fbe.ReadBuffer())
1804 reader.attach_buffer(writer.buffer)
1805 return reader.deserialize()[0]
1806
1807 def __eq__(self, other):
1808 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected