Struct deep clone
()
| 81 | |
| 82 | // Struct deep clone |
| 83 | func (s *Order) Clone() *Order { |
| 84 | // Serialize the struct to the FBE stream |
| 85 | writer := NewOrderModel(fbe.NewEmptyBuffer()) |
| 86 | _, _ = writer.Serialize(s) |
| 87 | |
| 88 | // Deserialize the struct from the FBE stream |
| 89 | reader := NewOrderModel(writer.Buffer()) |
| 90 | result, _, _ := reader.Deserialize() |
| 91 | return result |
| 92 | } |
| 93 | |
| 94 | // Get the struct key |
| 95 | func (s *Order) Key() OrderKey { |