pub struct McpConnectionTo<Counterpart: Role> { /* private fields */ }Expand description
Connection information available to an MCP server.
Implementations§
Source§impl<Counterpart: Role> McpConnectionTo<Counterpart>
impl<Counterpart: Role> McpConnectionTo<Counterpart>
Sourcepub fn context(&self) -> &McpConnectionContext
pub fn context(&self) -> &McpConnectionContext
Describes whether this is a standalone or ACP-attached MCP connection.
Sourcepub fn server_id(&self) -> Option<&McpServerAcpId>
Available on crate feature unstable_mcp_over_acp only.
pub fn server_id(&self) -> Option<&McpServerAcpId>
unstable_mcp_over_acp only.The identifier advertised in the session’s McpServer::Acp declaration.
Returns None for a standalone MCP connection.
Sourcepub fn connection_id(&self) -> Option<&McpConnectionId>
Available on crate feature unstable_mcp_over_acp only.
pub fn connection_id(&self) -> Option<&McpConnectionId>
unstable_mcp_over_acp only.The identifier for the active mcp/connect connection.
Returns None for a standalone MCP connection.
Sourcepub fn connection(&self) -> &ConnectionTo<Counterpart>
pub fn connection(&self) -> &ConnectionTo<Counterpart>
Borrow the host protocol connection.
For an ACP-attached server, this is its host ACP connection. For a standalone server, this is the direct MCP client connection.
Trait Implementations§
Auto Trait Implementations§
impl<Counterpart> !RefUnwindSafe for McpConnectionTo<Counterpart>
impl<Counterpart> !UnwindSafe for McpConnectionTo<Counterpart>
impl<Counterpart> Freeze for McpConnectionTo<Counterpart>where
Counterpart: Freeze,
impl<Counterpart> Send for McpConnectionTo<Counterpart>
impl<Counterpart> Sync for McpConnectionTo<Counterpart>
impl<Counterpart> Unpin for McpConnectionTo<Counterpart>where
Counterpart: Unpin,
impl<Counterpart> UnsafeUnpin for McpConnectionTo<Counterpart>where
Counterpart: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.