pub struct AppRuntimeApi { /* private fields */ }Expand description
Read-only helpers around AppRuntimeManager backed by stored config.
Implementations§
Source§impl AppRuntimeApi
impl AppRuntimeApi
Sourcepub fn new(launchers: Vec<AppRuntimeLauncher>) -> Self
pub fn new(launchers: Vec<AppRuntimeLauncher>) -> Self
Build an API from already prepared launchers.
Sourcepub fn from_config(
config: &McpConfigManager,
defaults: &StdioServerConfig,
) -> Result<Self, McpConfigError>
pub fn from_config( config: &McpConfigManager, defaults: &StdioServerConfig, ) -> Result<Self, McpConfigError>
Load app runtimes from disk and merge Workstream A stdio defaults.
Sourcepub fn available(&self) -> Vec<AppRuntimeSummary>
pub fn available(&self) -> Vec<AppRuntimeSummary>
List available runtimes and metadata.
Sourcepub fn launcher(
&self,
name: &str,
) -> Result<AppRuntimeLauncher, AppRuntimeError>
pub fn launcher( &self, name: &str, ) -> Result<AppRuntimeLauncher, AppRuntimeError>
Returns the launch-ready config bundle for the given runtime.
Sourcepub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
pub fn prepare(&self, name: &str) -> Result<AppRuntimeHandle, AppRuntimeError>
Prepare a stdio config + metadata for a runtime.
Sourcepub async fn start(
&self,
name: &str,
client: ClientInfo,
) -> Result<ManagedAppRuntime, AppRuntimeError>
pub async fn start( &self, name: &str, client: ClientInfo, ) -> Result<ManagedAppRuntime, AppRuntimeError>
Start an app runtime and return a managed handle.
Sourcepub fn stdio_config(
&self,
name: &str,
) -> Result<StdioServerConfig, AppRuntimeError>
pub fn stdio_config( &self, name: &str, ) -> Result<StdioServerConfig, AppRuntimeError>
Convenience accessor for the merged stdio config.
Sourcepub fn pool(&self) -> AppRuntimePool
pub fn pool(&self) -> AppRuntimePool
Build a pooled lifecycle manager that can reuse running runtimes.
Sourcepub fn into_pool(self) -> AppRuntimePool
pub fn into_pool(self) -> AppRuntimePool
Consume the API and return a pooled lifecycle manager.
Sourcepub fn pool_api(&self) -> AppRuntimePoolApi
pub fn pool_api(&self) -> AppRuntimePoolApi
Build a pooled lifecycle API that can reuse running runtimes.
Sourcepub fn into_pool_api(self) -> AppRuntimePoolApi
pub fn into_pool_api(self) -> AppRuntimePoolApi
Consume the API and return a pooled lifecycle API.
Trait Implementations§
Source§impl Clone for AppRuntimeApi
impl Clone for AppRuntimeApi
Source§fn clone(&self) -> AppRuntimeApi
fn clone(&self) -> AppRuntimeApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AppRuntimeApi
impl RefUnwindSafe for AppRuntimeApi
impl Send for AppRuntimeApi
impl Sync for AppRuntimeApi
impl Unpin for AppRuntimeApi
impl UnsafeUnpin for AppRuntimeApi
impl UnwindSafe for AppRuntimeApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more