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

Method clone

projects/Python/proto/enums.py:1350–1358  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1348
1349 # Struct deep clone
1350 def clone(self):
1351 # Serialize the struct to the FBE stream
1352 writer = EnumsModel(fbe.WriteBuffer())
1353 writer.serialize(self)
1354
1355 # Deserialize the struct from the FBE stream
1356 reader = EnumsModel(fbe.ReadBuffer())
1357 reader.attach_buffer(writer.buffer)
1358 return reader.deserialize()[0]
1359
1360 def __eq__(self, other):
1361 if not isinstance(self, other.__class__):

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
EnumsModelClass · 0.70
attach_bufferMethod · 0.45

Tested by

no test coverage detected