pub struct PluginMcpServer {
pub name: String,
pub config: PluginMcpServerConfig,
pub status: PluginMcpServerStatus,
/* private fields */
}Expand description
Plugin MCP server instance
Fields§
§name: StringServer name
config: PluginMcpServerConfigServer configuration
status: PluginMcpServerStatusCurrent status
Implementations§
Source§impl PluginMcpServer
impl PluginMcpServer
Sourcepub fn new(
name: String,
config: PluginMcpServerConfig,
plugin_path: String,
plugin_source: String,
) -> Self
pub fn new( name: String, config: PluginMcpServerConfig, plugin_path: String, plugin_source: String, ) -> Self
Create a new plugin MCP server
Sourcepub async fn start(&mut self) -> Result<(), AgentError>
pub async fn start(&mut self) -> Result<(), AgentError>
Start the MCP server
Sourcepub async fn stop(&mut self) -> Result<(), AgentError>
pub async fn stop(&mut self) -> Result<(), AgentError>
Stop the MCP server
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the server is running
Sourcepub fn get_status(&self) -> &PluginMcpServerStatus
pub fn get_status(&self) -> &PluginMcpServerStatus
Get the server status
Sourcepub fn get_connection(&self) -> Option<&McpConnection>
pub fn get_connection(&self) -> Option<&McpConnection>
Get the MCP connection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginMcpServer
impl !RefUnwindSafe for PluginMcpServer
impl Send for PluginMcpServer
impl Sync for PluginMcpServer
impl Unpin for PluginMcpServer
impl UnsafeUnpin for PluginMcpServer
impl !UnwindSafe for PluginMcpServer
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