Hacker News new | past | comments | ask | show | jobs | submit login

Specialized data structures can be built that contain primitives and other types supporting this kind of thing. But you still can't store arbitrary data because they could contain FFI pointers, handles to native resources, things that need to run destructors etc.

So to do this safely all the types must be whitelisted through a custom trait. Copy is close, but not quite, since references are still Copy.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: