linera-protocol
linera-protocol copied to clipboard
Implement Witty traits for `PhantomData`
Motivation
In some cases it might be easier to map a PhantomData 3field inside a trait that derives some of the Witty traits to a tuple<> unit type in the generated WIT snippet.
Proposal
Implement WitType, WitLoad and WitStore for the PhantomData<T> type, mapping it to the zero-sized unit type (tuple<>).
You made a good argument that it's always better to #[witty(skip)] anyway, and not have something like a _phantom: tuple<> field. So maybe it's actually better to not implement these for PhantomData?
Closing based on the discussion to use #[witty(skip)] instead.