pub struct McpServerHandle { /* private fields */ }Expand description
A connected MCP server together with its configuration and snapshot.
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 namespace(&self) -> &McpToolNamespace
pub fn namespace(&self) -> &McpToolNamespace
Returns the tool naming strategy in effect for this server.
Sourcepub fn tool_registry(&self) -> ToolRegistry
pub fn tool_registry(&self) -> ToolRegistry
Builds a ToolRegistry containing an McpToolAdapter for each tool.
Sourcepub fn capability_provider(&self) -> McpCapabilityProvider
pub fn capability_provider(&self) -> McpCapabilityProvider
Builds an McpCapabilityProvider from this server’s 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 (const: unstable) · 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 !RefUnwindSafe for McpServerHandle
impl !UnwindSafe for McpServerHandle
impl Freeze for McpServerHandle
impl Send for McpServerHandle
impl Sync for McpServerHandle
impl Unpin for McpServerHandle
impl UnsafeUnpin 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