đźš— Phantom Types in Rust
Sometimes in Rust, we want to tag a type with extra information without actually storing that information at runtime. That’s where phantom types and PhantomData come in. What is PhantomData? PhantomData<T> is a special zero-sized type in Rust that tells the compiler “I want to use this type T in my struct, but I don’t […]