pub enum Error {
    TimedOut,
    StreamClosed,
    InvalidParameter(Box<dyn Error + Send + 'static>),
    UnexpectedResponse(StatusCode),
    HttpStream(Box<dyn Error + Send + 'static>),
    Eof,
    UnexpectedEof,
    InvalidLine(String),
    InvalidEvent,
    MalformedLocationHeader(Box<dyn Error + Send + 'static>),
    MaxRedirectLimitReached(u32),
    Unexpected(Box<dyn Error + Send + 'static>),
}
Expand description

Error type returned from this library’s functions.

Variants

TimedOut

StreamClosed

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

An invalid request parameter

UnexpectedResponse(StatusCode)

The HTTP response could not be handled.

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

An error reading from the HTTP response body.

Eof

The HTTP response stream ended

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.

InvalidEvent

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

Encountered a malformed Location header.

MaxRedirectLimitReached(u32)

Reached maximum redirect limit after encountering Location headers.

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

An unexpected failure occurred.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts to this type from the input type.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more