pub struct McpRuntimeApi { /* private fields */ }Expand description
Read-only helpers around McpRuntimeManager backed by stored config.
Implementations§
Source§impl McpRuntimeApi
impl McpRuntimeApi
Sourcepub fn new(launchers: Vec<McpServerLauncher>) -> Self
pub fn new(launchers: Vec<McpServerLauncher>) -> Self
Build a runtime API from already prepared launchers/connectors.
Sourcepub fn from_config(
config: &McpConfigManager,
defaults: &StdioServerConfig,
) -> Result<Self, McpConfigError>
pub fn from_config( config: &McpConfigManager, defaults: &StdioServerConfig, ) -> Result<Self, McpConfigError>
Load runtime launchers from disk and merge Workstream A stdio defaults.
This is non-destructive: stored definitions are read, resolved, and left untouched.
Sourcepub fn available(&self) -> Vec<McpRuntimeSummary>
pub fn available(&self) -> Vec<McpRuntimeSummary>
List available runtimes along with tool hints.
Sourcepub fn launcher(&self, name: &str) -> Result<McpServerLauncher, McpRuntimeError>
pub fn launcher(&self, name: &str) -> Result<McpServerLauncher, McpRuntimeError>
Returns a launch-ready config for the given runtime.
Sourcepub fn stdio_launcher(
&self,
name: &str,
) -> Result<StdioLauncher, McpRuntimeError>
pub fn stdio_launcher( &self, name: &str, ) -> Result<StdioLauncher, McpRuntimeError>
Returns the stdio launcher for a runtime, erroring if it uses HTTP.
Sourcepub fn http_connector(
&self,
name: &str,
) -> Result<StreamableHttpConnector, McpRuntimeError>
pub fn http_connector( &self, name: &str, ) -> Result<StreamableHttpConnector, McpRuntimeError>
Returns the HTTP connector for a runtime, erroring if it uses stdio.
Sourcepub fn prepare(&self, name: &str) -> Result<McpRuntimeHandle, McpRuntimeError>
pub fn prepare(&self, name: &str) -> Result<McpRuntimeHandle, McpRuntimeError>
Prepare a runtime handle for connection or spawn.
Trait Implementations§
Source§impl Clone for McpRuntimeApi
impl Clone for McpRuntimeApi
Source§fn clone(&self) -> McpRuntimeApi
fn clone(&self) -> McpRuntimeApi
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 McpRuntimeApi
impl RefUnwindSafe for McpRuntimeApi
impl Send for McpRuntimeApi
impl Sync for McpRuntimeApi
impl Unpin for McpRuntimeApi
impl UnsafeUnpin for McpRuntimeApi
impl UnwindSafe for McpRuntimeApi
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