phantomdata

PhantomData for zero-cost type-level markers

PhantomData<T> is a zero-sized type that acts as if it owns T for the purposes of lifetimes, variance, and drop check. I use it in the typestate pattern or when a struct logically depends on T but doesn't store it. For example, a handle to an ex