#[non_exhaustive]pub enum McpConnectionContext {
Standalone,
Acp {
server_id: McpServerAcpId,
connection_id: McpConnectionId,
},
}Expand description
Describes how an MCP server connection was established.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Standalone
The MCP server was connected directly, without an ACP transport.
Acp
Available on crate feature
unstable_mcp_over_acp only.The MCP server was attached to an ACP session.
Fields
§
server_id: McpServerAcpIdThe identifier advertised in the session’s McpServer::Acp declaration.
§
connection_id: McpConnectionIdThe identifier for this active mcp/connect connection.
Implementations§
Source§impl McpConnectionContext
impl McpConnectionContext
Sourcepub fn is_standalone(&self) -> bool
pub fn is_standalone(&self) -> bool
Whether this MCP connection was established without an ACP transport.
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.
Trait Implementations§
Source§impl Clone for McpConnectionContext
impl Clone for McpConnectionContext
Source§fn clone(&self) -> McpConnectionContext
fn clone(&self) -> McpConnectionContext
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 moreSource§impl Debug for McpConnectionContext
impl Debug for McpConnectionContext
impl Eq for McpConnectionContext
Source§impl PartialEq for McpConnectionContext
impl PartialEq for McpConnectionContext
impl StructuralPartialEq for McpConnectionContext
Auto Trait Implementations§
impl Freeze for McpConnectionContext
impl RefUnwindSafe for McpConnectionContext
impl Send for McpConnectionContext
impl Sync for McpConnectionContext
impl Unpin for McpConnectionContext
impl UnsafeUnpin for McpConnectionContext
impl UnwindSafe for McpConnectionContext
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.