static_of

Function static_of 

Source
pub fn static_of<T>() -> Option<NonNull<*mut T>>
where T: FromSingleton + Sized,
Expand description

Returns a pointer to the pointer to a singleton instance using Dantelion2 reflection. May return None if the singleton was not found.

This function is safe, but it may not find all singletons if it is called before Dantelion2 reflection is initialized by the process.

Ensure the return value is convertible to a reference before dereferencing it.