Enum McpTransportError
pub enum McpTransportError {
StaleSession {
status: u16,
},
TransportClosed,
}Expand description
Transport-level failures that are recoverable by reconnecting — resetting the session and re-running the MCP handshake — rather than surfacing to the caller. Distinct from a genuine tool/application error, which must be reported as-is and never retried.
Variants§
StaleSession
The server no longer recognizes our session (typically after it restarted). Surfaced from HTTP 404/410 responses.
TransportClosed
The underlying stream/connection dropped before a response arrived (e.g. SSE EOF or connection reset).
Trait Implementations§
Source§impl Debug for McpTransportError
impl Debug for McpTransportError
Source§impl Display for McpTransportError
impl Display for McpTransportError
Source§impl Error for McpTransportError
impl Error for McpTransportError
1.30.0 · §fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · §fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for McpTransportError
impl RefUnwindSafe for McpTransportError
impl Send for McpTransportError
impl Sync for McpTransportError
impl Unpin for McpTransportError
impl UnsafeUnpin for McpTransportError
impl UnwindSafe for McpTransportError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more