pub struct LazyMcpLoader { /* private fields */ }Expand description
懒加载 MCP 工具集 - 从配置预先创建工具定义,但不启动服务器
Implementations§
Source§impl LazyMcpLoader
impl LazyMcpLoader
Sourcepub fn from_config(config: McpConfig) -> Self
pub fn from_config(config: McpConfig) -> Self
从配置创建懒加载工具集
Sourcepub async fn discover_tools(&self) -> Result<Vec<LazyMcpTool>>
pub async fn discover_tools(&self) -> Result<Vec<LazyMcpTool>>
发现工具定义(不启动服务器) 返回占位符工具,调用时才启动
Auto Trait Implementations§
impl Freeze for LazyMcpLoader
impl !RefUnwindSafe for LazyMcpLoader
impl Send for LazyMcpLoader
impl Sync for LazyMcpLoader
impl Unpin for LazyMcpLoader
impl UnsafeUnpin for LazyMcpLoader
impl !UnwindSafe for LazyMcpLoader
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