Skip to main content

RuntimeProvider

Trait RuntimeProvider 

Source
pub trait RuntimeProvider:
    Send
    + Sync
    + 'static {
Show 14 methods // Provided methods fn configure<'life0, 'life1, 'async_trait>( &'life0 self, _name: &'life1 str, _config: Map<String, Value>, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn metadata(&self) -> Option<RuntimeMetadata> { ... } fn warnings(&self) -> Vec<String> { ... } fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_support<'life0, 'async_trait>( &'life0 self, _request: (), ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSupport>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn start_session<'life0, 'async_trait>( &'life0 self, _request: StartRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSession>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_session<'life0, 'async_trait>( &'life0 self, _request: GetRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSession>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn list_sessions<'life0, 'async_trait>( &'life0 self, _request: ListRuntimeSessionsRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<ListRuntimeSessionsResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn stop_session<'life0, 'async_trait>( &'life0 self, _request: StopRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn prepare_workspace<'life0, 'async_trait>( &'life0 self, _request: PrepareRuntimeWorkspaceRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<PrepareRuntimeWorkspaceResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn remove_workspace<'life0, 'async_trait>( &'life0 self, _request: RemoveRuntimeWorkspaceRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn start_app<'life0, 'async_trait>( &'life0 self, _request: StartHostedAppRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<HostedApp>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Provider trait for serving hosted runtime sessions.

Provided Methods§

Source

fn configure<'life0, 'life1, 'async_trait>( &'life0 self, _name: &'life1 str, _config: Map<String, Value>, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Configures the provider before it starts serving requests.

Source

fn metadata(&self) -> Option<RuntimeMetadata>

Returns runtime metadata that should augment the static manifest.

Source

fn warnings(&self) -> Vec<String>

Returns non-fatal warnings the host should surface to users.

Source

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Performs an optional health check.

Source

fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Starts provider-owned background work after configuration.

Source

fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shuts the provider down before the runtime exits.

Source

fn get_support<'life0, 'async_trait>( &'life0 self, _request: (), ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSupport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the runtime capabilities supported by this provider.

Source

fn start_session<'life0, 'async_trait>( &'life0 self, _request: StartRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Starts a hosted runtime session.

Source

fn get_session<'life0, 'async_trait>( &'life0 self, _request: GetRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<RuntimeSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns one hosted runtime session by ID.

Source

fn list_sessions<'life0, 'async_trait>( &'life0 self, _request: ListRuntimeSessionsRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<ListRuntimeSessionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists hosted runtime sessions.

Source

fn stop_session<'life0, 'async_trait>( &'life0 self, _request: StopRuntimeSessionRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stops a hosted runtime session.

Source

fn prepare_workspace<'life0, 'async_trait>( &'life0 self, _request: PrepareRuntimeWorkspaceRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<PrepareRuntimeWorkspaceResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prepares an agent workspace for use by a hosted app.

Source

fn remove_workspace<'life0, 'async_trait>( &'life0 self, _request: RemoveRuntimeWorkspaceRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Removes a previously prepared agent workspace.

Source

fn start_app<'life0, 'async_trait>( &'life0 self, _request: StartHostedAppRequest, ) -> Pin<Box<dyn Future<Output = ProviderResult<HostedApp>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Starts one hosted app process inside a runtime session.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§