pub trait MacpRuntimeService:
Send
+ Sync
+ 'static {
type StreamSessionStream: Stream<Item = Result<StreamSessionResponse, Status>> + Send + 'static;
type WatchModeRegistryStream: Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send + 'static;
type WatchRootsStream: Stream<Item = Result<WatchRootsResponse, Status>> + Send + 'static;
type WatchSignalsStream: Stream<Item = Result<WatchSignalsResponse, Status>> + Send + 'static;
type WatchSessionsStream: Stream<Item = Result<WatchSessionsResponse, Status>> + Send + 'static;
type WatchPoliciesStream: Stream<Item = Result<WatchPoliciesResponse, Status>> + Send + 'static;
Show 24 methods
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
request: Request<InitializeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InitializeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send<'life0, 'async_trait>(
&'life0 self,
request: Request<SendRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_session<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<StreamSessionRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamSessionStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_session<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetSessionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel_session<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelSessionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn suspend_session<'life0, 'async_trait>(
&'life0 self,
request: Request<SuspendSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SuspendSessionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn resume_session<'life0, 'async_trait>(
&'life0 self,
request: Request<ResumeSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ResumeSessionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_manifest<'life0, 'async_trait>(
&'life0 self,
request: Request<GetManifestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetManifestResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_modes<'life0, 'async_trait>(
&'life0 self,
request: Request<ListModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListModesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_mode_registry<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchModeRegistryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchModeRegistryStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_roots<'life0, 'async_trait>(
&'life0 self,
request: Request<ListRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListRootsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_roots<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchRootsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_ext_modes<'life0, 'async_trait>(
&'life0 self,
request: Request<ListExtModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListExtModesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterExtModeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unregister_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterExtModeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn promote_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<PromoteModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PromoteModeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_signals<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSignalsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSignalsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSessionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterPolicyResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unregister_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterPolicyResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPolicyResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_policies<'life0, 'async_trait>(
&'life0 self,
request: Request<ListPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListPoliciesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_policies<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchPoliciesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with MacpRuntimeServiceServer.
Required Associated Types§
Sourcetype StreamSessionStream: Stream<Item = Result<StreamSessionResponse, Status>> + Send + 'static
type StreamSessionStream: Stream<Item = Result<StreamSessionResponse, Status>> + Send + 'static
Server streaming response type for the StreamSession method.
Sourcetype WatchModeRegistryStream: Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send + 'static
type WatchModeRegistryStream: Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send + 'static
Server streaming response type for the WatchModeRegistry method.
Sourcetype WatchRootsStream: Stream<Item = Result<WatchRootsResponse, Status>> + Send + 'static
type WatchRootsStream: Stream<Item = Result<WatchRootsResponse, Status>> + Send + 'static
Server streaming response type for the WatchRoots method.
Sourcetype WatchSignalsStream: Stream<Item = Result<WatchSignalsResponse, Status>> + Send + 'static
type WatchSignalsStream: Stream<Item = Result<WatchSignalsResponse, Status>> + Send + 'static
Server streaming response type for the WatchSignals method.
Sourcetype WatchSessionsStream: Stream<Item = Result<WatchSessionsResponse, Status>> + Send + 'static
type WatchSessionsStream: Stream<Item = Result<WatchSessionsResponse, Status>> + Send + 'static
Server streaming response type for the WatchSessions method.
Sourcetype WatchPoliciesStream: Stream<Item = Result<WatchPoliciesResponse, Status>> + Send + 'static
type WatchPoliciesStream: Stream<Item = Result<WatchPoliciesResponse, Status>> + Send + 'static
Server streaming response type for the WatchPolicies method.
Required Methods§
fn initialize<'life0, 'async_trait>(
&'life0 self,
request: Request<InitializeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InitializeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
request: Request<SendRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_session<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<StreamSessionRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamSessionStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_session<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn suspend_session<'life0, 'async_trait>(
&'life0 self,
request: Request<SuspendSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SuspendSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn suspend_session<'life0, 'async_trait>(
&'life0 self,
request: Request<SuspendSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SuspendSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Session suspension / resume (RFC-MACP-0001 §7.5)
fn resume_session<'life0, 'async_trait>(
&'life0 self,
request: Request<ResumeSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ResumeSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_manifest<'life0, 'async_trait>(
&'life0 self,
request: Request<GetManifestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetManifestResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_modes<'life0, 'async_trait>(
&'life0 self,
request: Request<ListModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_mode_registry<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchModeRegistryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchModeRegistryStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_roots<'life0, 'async_trait>(
&'life0 self,
request: Request<ListRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListRootsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_roots<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchRootsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_ext_modes<'life0, 'async_trait>(
&'life0 self,
request: Request<ListExtModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListExtModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_ext_modes<'life0, 'async_trait>(
&'life0 self,
request: Request<ListExtModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListExtModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Extension mode lifecycle
fn register_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterExtModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unregister_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterExtModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn promote_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<PromoteModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PromoteModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn watch_signals<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSignalsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSignalsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_signals<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSignalsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSignalsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ambient Signal observation
Sourcefn list_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Session lifecycle observation (RFC-MACP-0001 §7.3)
fn watch_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSessionsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn register_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Governance policy lifecycle (RFC-MACP-0012)
fn unregister_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_policies<'life0, 'async_trait>(
&'life0 self,
request: Request<ListPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListPoliciesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_policies<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchPoliciesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".