pub struct McpServerHandle { /* private fields */ }Expand description
A connected MCP server together with its configuration and discovery snapshot.
Obtained from McpServerManager::connect_server or
McpServerManager::connect_all. Provides convenience methods to create
tool registries and capability providers from the server’s discovered capabilities.
Implementations§
Source§impl McpServerHandle
impl McpServerHandle
Sourcepub fn config(&self) -> &McpServerConfig
pub fn config(&self) -> &McpServerConfig
Returns the original configuration used to connect this server.
Sourcepub fn server_id(&self) -> &McpServerId
pub fn server_id(&self) -> &McpServerId
Returns the server’s unique identifier.
Sourcepub fn connection(&self) -> Arc<McpConnection>
pub fn connection(&self) -> Arc<McpConnection>
Returns a shared reference to the underlying McpConnection.
Sourcepub fn snapshot(&self) -> &McpDiscoverySnapshot
pub fn snapshot(&self) -> &McpDiscoverySnapshot
Returns the discovery snapshot captured when the server was connected.
Sourcepub fn tool_registry(&self) -> ToolRegistry
pub fn tool_registry(&self) -> ToolRegistry
Builds a ToolRegistry containing an McpToolAdapter for each tool
discovered on this server.
Sourcepub fn capability_provider(&self) -> McpCapabilityProvider
pub fn capability_provider(&self) -> McpCapabilityProvider
Builds an McpCapabilityProvider from this server’s discovery snapshot.
Trait Implementations§
Source§impl Clone for McpServerHandle
impl Clone for McpServerHandle
Source§fn clone(&self) -> McpServerHandle
fn clone(&self) -> McpServerHandle
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 McpServerHandle
impl !RefUnwindSafe for McpServerHandle
impl Send for McpServerHandle
impl Sync for McpServerHandle
impl Unpin for McpServerHandle
impl UnsafeUnpin for McpServerHandle
impl !UnwindSafe for McpServerHandle
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