Deserialize deserializes data directly into the provided target, thread-safe. Takes pointer to avoid interface heap allocation and enable direct writes.
(f *Fory, data []byte, target *T)
| 120 | // Deserialize deserializes data directly into the provided target, thread-safe. |
| 121 | // Takes pointer to avoid interface heap allocation and enable direct writes. |
| 122 | func Deserialize[T any](f *Fory, data []byte, target *T) error { |
| 123 | inner := f.acquire() |
| 124 | defer f.release(inner) |
| 125 | return fory.Deserialize(inner, data, target) |
| 126 | } |
| 127 | |
| 128 | // ============================================================================ |
| 129 | // Global convenience functions |