#[non_exhaustive]pub enum SseErrorKind {
Http(Error),
Status(Status),
UnexpectedContentType(Option<String>),
AlreadyExecuted,
NoBody,
}Available on crate feature
sse only.Expand description
The kind of error that occurred attempting to open an EventStream.
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.
Http(Error)
An HTTP error attempting to make the request.
Status(Status)
The response status was not a success (2xx).
UnexpectedContentType(Option<String>)
The response content-type was not text/event-stream.
AlreadyExecuted
Conn::into_sse was called on a Conn that had already been executed (its status is
already set). The request is the execution; build the conn and await into_sse
directly without awaiting first.
NoBody
The response had no body to read as an event stream.
Trait Implementations§
Source§impl Debug for SseErrorKind
impl Debug for SseErrorKind
Source§impl Display for SseErrorKind
impl Display for SseErrorKind
Source§impl Error for SseErrorKind
impl Error for SseErrorKind
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SseErrorKind
impl !UnwindSafe for SseErrorKind
impl Freeze for SseErrorKind
impl Send for SseErrorKind
impl Sync for SseErrorKind
impl Unpin for SseErrorKind
impl UnsafeUnpin for SseErrorKind
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