3 ms·
> PhantomData Usually when you want to give type some information it wouldn't normaly have. Like e.g. using it to store generic type signature for some kind of
by Ygg2 4y ago
> PhantomData
Usually when you want to give type some information it wouldn't normaly have. Like e.g. using it to store generic type signature for some kind of SQL builder. or to keep a lifetime that would otherwise be unbound.
> Pin
Just for self-referential structs. Since async relies on self-referential, it might also require it.
---
When to use it? When you either exhaust all other options or know enough to judge it worthwhile.