* Clone struct (deep clone) * @this {!StructList} * @returns {!StructList} Cloned struct
()
| 17013 | * @returns {!StructList} Cloned struct |
| 17014 | */ |
| 17015 | clone () { |
| 17016 | // Serialize the struct to the FBE stream |
| 17017 | let writer = new StructListModel(new fbe.WriteBuffer()) |
| 17018 | writer.serialize(this) |
| 17019 | |
| 17020 | // Deserialize the struct from the FBE stream |
| 17021 | let reader = new StructListModel(new fbe.ReadBuffer()) |
| 17022 | reader.attachBuffer(writer.buffer) |
| 17023 | return reader.deserialize().value |
| 17024 | } |
| 17025 | |
| 17026 | /** |
| 17027 | * Is this struct equal to other one? |
nothing calls this directly
no test coverage detected