#[non_exhaustive]pub enum StreamableHttpError<E: Error + Send + Sync + 'static> {
Show 20 variants
Sse(SseError),
Io(Error),
Client(E),
UnexpectedEndOfStream,
UnexpectedServerResponse(Cow<'static, str>),
UnexpectedContentType(Option<String>),
ServerDoesNotSupportSse,
ServerDoesNotSupportDeleteSession,
TokioJoinError(JoinError),
Deserialize(Error),
TransportChannelClosed,
MissingSessionIdInResponse,
Auth(AuthError),
AuthRequired(AuthRequiredError),
InsufficientScope(InsufficientScopeError),
ReservedHeaderConflict(String),
SessionExpired,
SessionRecoveryTimeout,
ReinitializationFailed(ErrorData),
ControlRequestTimeout,
}Available on crate feature
transport-streamable-http-client and (crate features client or server) only.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.
Sse(SseError)
Io(Error)
Client(E)
UnexpectedEndOfStream
UnexpectedServerResponse(Cow<'static, str>)
UnexpectedContentType(Option<String>)
ServerDoesNotSupportSse
ServerDoesNotSupportDeleteSession
TokioJoinError(JoinError)
Deserialize(Error)
TransportChannelClosed
MissingSessionIdInResponse
Auth(AuthError)
Available on crate feature
auth only.AuthRequired(AuthRequiredError)
InsufficientScope(InsufficientScopeError)
ReservedHeaderConflict(String)
SessionExpired
SessionRecoveryTimeout
Session recovery timed out. The server may have processed an interrupted POST.
ReinitializationFailed(ErrorData)
The server answered the session re-initialization with a JSON-RPC error.
ControlRequestTimeout
A cancellation or reply POST did not finish in time.
Implementations§
Source§impl<E: Error + Send + Sync + 'static> StreamableHttpError<E>
impl<E: Error + Send + Sync + 'static> StreamableHttpError<E>
Sourcepub fn auth_challenge(&self) -> Option<&str>
Available on crate feature auth only.
pub fn auth_challenge(&self) -> Option<&str>
auth only.The WWW-Authenticate challenge carried by this error, when the
server answered 401 (AuthRequired) or 403
(InsufficientScope). Feed it to
AuthorizationRequest::with_challenge
to authorize reactively.
Trait Implementations§
Source§impl<E> Display for StreamableHttpError<E>
impl<E> Display for StreamableHttpError<E>
Source§impl<E: Error + Send + Sync + 'static> Error for StreamableHttpError<E>
impl<E: Error + Send + Sync + 'static> Error for StreamableHttpError<E>
Source§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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for StreamableHttpError<Error>
Available on crate features __reqwest and transport-streamable-http-client-reqwest only.
impl From<Error> for StreamableHttpError<Error>
Available on crate features
__reqwest and transport-streamable-http-client-reqwest only.Source§impl From<UnixSocketError> for StreamableHttpError<UnixSocketError>
Available on Unix and crate feature transport-streamable-http-client-unix-socket only.
impl From<UnixSocketError> for StreamableHttpError<UnixSocketError>
Available on Unix and crate feature
transport-streamable-http-client-unix-socket only.Source§fn from(e: UnixSocketError) -> Self
fn from(e: UnixSocketError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> !RefUnwindSafe for StreamableHttpError<E>
impl<E> !UnwindSafe for StreamableHttpError<E>
impl<E> Freeze for StreamableHttpError<E>where
E: Freeze,
impl<E> Send for StreamableHttpError<E>
impl<E> Sync for StreamableHttpError<E>
impl<E> Unpin for StreamableHttpError<E>where
E: Unpin,
impl<E> UnsafeUnpin for StreamableHttpError<E>where
E: 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