Tutorial by Examples

Using the PhantomData type like this allows you to use a specific type without needing it to be part of the Struct. use std::marker::PhantomData; struct Authenticator<T: GetInstance> { _marker: PhantomData<*const T>, // Using `*const T` indicates that we do not own a T } imp...

Page 1 of 1