pub fn fetch_global_var<T>(key: &str) -> Result<&'static T, String>Expand description
Retrieves a reference to a global variable of type T stored with the given key.
§Arguments
key- The string key used to identify the global variable
§Returns
Ok(&'static T)- A static reference to the stored value if foundErr(String)- Error message if mutex lock fails or key not found
§Safety
This function contains unsafe code when dereferencing the stored pointer. Caller must ensure the type T matches the actual stored type.