Skip to main content

get_service_registry

Function get_service_registry 

Source
fn get_service_registry() -> Option<ServiceRegistry>
Expand description

Get a reference to the global service registry

Returns None if not initialized (should not happen in normal operation).

ยงSafety

This function uses an unsafe block to get a static reference to the service registry. This is safe because:

  1. The SERVICE_REGISTRY is a static RwLock that lives for the entire program
  2. We only write to it during initialization (before any land:// requests)
  3. After initialization, we only read from it
  4. The RwLock guarantees thread-safe access