#[non_exhaustive]pub enum TransportError {
Show 19 variants
ConnectionFailed(String),
ConnectionLost(String),
SendFailed(String),
ReceiveFailed(String),
SerializationFailed(String),
ProtocolError(String),
Timeout,
ConnectionTimeout {
operation: String,
timeout: Duration,
},
RequestTimeout {
operation: String,
timeout: Duration,
},
TotalTimeout {
operation: String,
timeout: Duration,
},
ReadTimeout {
operation: String,
timeout: Duration,
},
ConfigurationError(String),
AuthenticationFailed(String),
RateLimitExceeded,
NotAvailable(String),
Io(String),
Internal(String),
RequestTooLarge {
size: usize,
max: usize,
},
ResponseTooLarge {
size: usize,
max: usize,
},
}Expand description
Represents errors that can occur during transport operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConnectionFailed(String)
Failed to establish a connection.
ConnectionLost(String)
An established connection was lost.
SendFailed(String)
Failed to send a message.
ReceiveFailed(String)
Failed to receive a message.
SerializationFailed(String)
Failed to serialize or deserialize a message.
ProtocolError(String)
A protocol-level error occurred.
Timeout
The operation did not complete within the specified timeout.
ConnectionTimeout
Connection establishment timed out.
Fields
RequestTimeout
Single request timed out.
Fields
TotalTimeout
Total operation timed out (including retries).
Fields
ReadTimeout
Read operation timed out (streaming).
Fields
ConfigurationError(String)
The transport was configured with invalid parameters.
AuthenticationFailed(String)
Authentication with the remote endpoint failed.
RateLimitExceeded
The request was rejected due to rate limiting.
NotAvailable(String)
The requested transport is not available.
Io(String)
An underlying I/O error occurred.
Internal(String)
An unexpected internal error occurred.
RequestTooLarge
Request size exceeds the configured maximum limit.
Fields
ResponseTooLarge
Response size exceeds the configured maximum limit.
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§fn clone(&self) -> TransportError
fn clone(&self) -> TransportError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for TransportError
impl From<Error> for TransportError
Source§fn from(err: Error) -> TransportError
fn from(err: Error) -> TransportError
Source§impl From<Error> for TransportError
impl From<Error> for TransportError
Source§fn from(err: Error) -> TransportError
fn from(err: Error) -> TransportError
Source§impl From<McpError> for TransportError
impl From<McpError> for TransportError
Source§fn from(err: McpError) -> TransportError
fn from(err: McpError) -> TransportError
Auto Trait Implementations§
impl Freeze for TransportError
impl RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
impl UnwindSafe for TransportError
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
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<E> IntoToolError for Ewhere
E: Display,
impl<E> IntoToolError for Ewhere
E: Display,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.