* Clone struct (deep clone) * @this {!StructBytes} * @returns {!StructBytes} Cloned struct
()
| 12635 | * @returns {!StructBytes} Cloned struct |
| 12636 | */ |
| 12637 | clone () { |
| 12638 | // Serialize the struct to the FBE stream |
| 12639 | let writer = new StructBytesModel(new fbe.WriteBuffer()) |
| 12640 | writer.serialize(this) |
| 12641 | |
| 12642 | // Deserialize the struct from the FBE stream |
| 12643 | let reader = new StructBytesModel(new fbe.ReadBuffer()) |
| 12644 | reader.attachBuffer(writer.buffer) |
| 12645 | return reader.deserialize().value |
| 12646 | } |
| 12647 | |
| 12648 | /** |
| 12649 | * Is this struct equal to other one? |
nothing calls this directly
no test coverage detected