pub trait ServiceApi: Send + Sync {
// Required methods
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
method: &'life2 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_services<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ServiceInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health<'life0, 'life1, 'async_trait>(
&'life0 self,
service: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Internal API surface for protocol adapters (Shell, MCP, HTTP).
Protocol adapters bind to this trait to invoke kernel services through a uniform interface. The kernel provides a concrete implementation backed by the ServiceRegistry + A2ARouter.
Required Methods§
Sourcefn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
method: &'life2 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service: &'life1 str,
method: &'life2 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Call a method on a named service.
Sourcefn list_services<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ServiceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_services<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ServiceInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available services.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".