Enum reqwest_eventsource::Error
source · pub enum Error {
Utf8(FromUtf8Error),
Parser(Error<String>),
Transport(Error),
InvalidContentType(HeaderValue, Response),
InvalidStatusCode(StatusCode, Response),
InvalidLastEventId(String),
StreamEnded,
}
Expand description
Error raised by the EventSource stream fetching and parsing
Variants§
Utf8(FromUtf8Error)
Source stream is not valid UTF8
Parser(Error<String>)
Source stream is not a valid EventStream
Transport(Error)
The HTTP Request could not be completed
InvalidContentType(HeaderValue, Response)
The Content-Type
returned by the server is invalid
InvalidStatusCode(StatusCode, Response)
The status code returned by the server is invalid
InvalidLastEventId(String)
The Last-Event-ID
cannot be formed into a Header to be submitted to the server
StreamEnded
The stream ended
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<EventStreamError<Error>> for Error
impl From<EventStreamError<Error>> for Error
source§fn from(err: EventStreamError<ReqwestError>) -> Self
fn from(err: EventStreamError<ReqwestError>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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