Closed vedantroy closed 3 years ago
Is it possible to use the underlying type? It seems like this macro generates custom types, which makes it hard to pass the global variables into, for example, functions.
The underlying type is accessible via Deref impl. If you pass this to generic code, you might have to be explicit in dereferencing:
Deref
lazy_static! { static ref FOO: T = T::new(); } let x: &T = &*FOO;
Is it possible to use the underlying type? It seems like this macro generates custom types, which makes it hard to pass the global variables into, for example, functions.