J
jeremy
Video
PhantomData and the Typestate Pattern for Compile-Time Safety in Rust
PhantomData is a zero-sized "marker type" in Rust that lets a type declare a relationship (to a lifetime, a generic type parameter, or variance behavior) that the compiler cannot otherwise infer from…