Struct deep clone
()
| 87 | |
| 88 | // Struct deep clone |
| 89 | func (s *Order) Clone() *Order { |
| 90 | // Serialize the struct to the FBE stream |
| 91 | writer := NewOrderModel(fbe.NewEmptyBuffer()) |
| 92 | _, _ = writer.Serialize(s) |
| 93 | |
| 94 | // Deserialize the struct from the FBE stream |
| 95 | reader := NewOrderModel(writer.Buffer()) |
| 96 | result, _, _ := reader.Deserialize() |
| 97 | return result |
| 98 | } |
| 99 | |
| 100 | // Get the struct key |
| 101 | func (s *Order) Key() OrderKey { |
nothing calls this directly
no test coverage detected