[][src]Enum eventsource_client::Error

pub enum Error {
    HttpRequest(Box<dyn Error + Send + 'static>),
    HttpStream(Box<dyn Error + Send + 'static>),
    UnexpectedEof,
    InvalidLine(String),
    InvalidEventType(Utf8Error),
}

Error type returned from this library's functions.

Variants

HttpRequest(Box<dyn Error + Send + 'static>)

The HTTP request failed.

HttpStream(Box<dyn Error + Send + 'static>)

An error reading from the HTTP response body.

UnexpectedEof

The HTTP response stream ended unexpectedly (e.g. in the middle of an event).

InvalidLine(String)

Encountered a line not conforming to the SSE protocol.

InvalidEventType(Utf8Error)

Encountered an event type that is not a valid UTF-8 byte sequence.

Methods

impl Error[src]

pub fn is_http_stream_error(&self) -> bool[src]

pub fn source(&self) -> Option<&(dyn Error + 'static)>[src]

Trait Implementations

impl PartialEq<Error> for Error[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Debug for Error[src]

Auto Trait Implementations

impl !Sync for Error

impl Send for Error

impl Unpin for Error

impl !RefUnwindSafe for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err