Skip to main content

SystemCapability

Trait SystemCapability 

Source
pub trait SystemCapability: Send + Sync {
    // Provided methods
    fn wire_runtime(&self, _sys: &SystemContext) -> Result<()> { ... }
    fn legacy_finalize_after_application_init<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _sys: &'life1 SystemContext,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Infrastructure that starts before application preparation: types registry, service discovery, cluster and gRPC hub.

The system group completes startup before application preparation and serves during GTS admission. System gears cannot publish via gts_publication(...) or depend on/consume local application gears. Early OoP HTTP routes allow only platform-plane and anonymous calls; tenant auth is not wired yet.

Embedded hosts serve probes and system platform routes before application startup. Lifecycle hooks live on Gear; this trait receives runtime internals.

Provided Methods§

Source

fn wire_runtime(&self, _sys: &SystemContext) -> Result<()>

Receive runtime internals, once, before the gear’s pre_init.

Service discovery takes the gear manager; the gRPC hub takes the installer store and the process instance id. Default: nothing.

§Errors

Returns an error if the gear cannot take the runtime internals.

Source

fn legacy_finalize_after_application_init<'life0, 'life1, 'async_trait>( &'life0 self, _sys: &'life1 SystemContext, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Temporary hook for the legacy registry’s in-memory ready mode only. Validates all legacy registrations once, after application init and proxy wiring, before application post_init. Removed with that ready mode.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§