First of all, thank you for this very elaborate answer. So that means OnceCell can never be used in a static but only as local variable / member variable? I see, that makes sense and also reduces its use cases by a lot of what I initially thought. But your example makes sense and the name/package also suggest it’s not thread-safe in itself, I had just wrongly assumed OnceCell was meant to be used in static contexts.
First of all, thank you for this very elaborate answer. So that means OnceCell can never be used in a static but only as local variable / member variable? I see, that makes sense and also reduces its use cases by a lot of what I initially thought. But your example makes sense and the name/package also suggest it’s not thread-safe in itself, I had just wrongly assumed OnceCell was meant to be used in static contexts.
Thanks!