Enum McpTransportError
pub enum McpTransportError {
StaleSession {
status: u16,
},
TransportClosed,
RecoveryPending,
}Expand description
Transport-level failures that require reconnecting and re-running the MCP handshake. The client may retry only when the request is known not to have been written; failures after a possible write are surfaced without replay. Distinct from a genuine tool/application error, which is always 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).
RecoveryPending
A recovery was published after this request entered the transport but before it crossed the concrete writer boundary. The caller must wait for that recovery instead of treating this as a connection failure.
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)>
1.0.0 · §fn description(&self) -> &str
fn description(&self) -> &str
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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>
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>
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