* Clone struct (deep clone) * @this {!StructOptional} * @returns {!StructOptional} Cloned struct
()
| 5879 | * @returns {!StructOptional} Cloned struct |
| 5880 | */ |
| 5881 | clone () { |
| 5882 | // Serialize the struct to the FBE stream |
| 5883 | let writer = new StructOptionalModel(new fbe.WriteBuffer()) |
| 5884 | writer.serialize(this) |
| 5885 | |
| 5886 | // Deserialize the struct from the FBE stream |
| 5887 | let reader = new StructOptionalModel(new fbe.ReadBuffer()) |
| 5888 | reader.attachBuffer(writer.buffer) |
| 5889 | return reader.deserialize().value |
| 5890 | } |
| 5891 | |
| 5892 | /** |
| 5893 | * Is this struct equal to other one? |
nothing calls this directly
no test coverage detected