Skip to main content

MacpRuntimeService

Trait MacpRuntimeService 

Source
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§

Source

type StreamSessionStream: Stream<Item = Result<StreamSessionResponse, Status>> + Send + 'static

Server streaming response type for the StreamSession method.

Source

type WatchModeRegistryStream: Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send + 'static

Server streaming response type for the WatchModeRegistry method.

Source

type WatchRootsStream: Stream<Item = Result<WatchRootsResponse, Status>> + Send + 'static

Server streaming response type for the WatchRoots method.

Source

type WatchSignalsStream: Stream<Item = Result<WatchSignalsResponse, Status>> + Send + 'static

Server streaming response type for the WatchSignals method.

Source

type WatchSessionsStream: Stream<Item = Result<WatchSessionsResponse, Status>> + Send + 'static

Server streaming response type for the WatchSessions method.

Source

type WatchPoliciesStream: Stream<Item = Result<WatchPoliciesResponse, Status>> + Send + 'static

Server streaming response type for the WatchPolicies method.

Required Methods§

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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)

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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

Source

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,

Source

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,

Source

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,

Source

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

Source

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)

Source

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,

Source

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)

Source

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,

Source

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,

Source

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,

Source

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".

Implementors§