Enum ureq::Error

source ·
pub enum Error {
    BadUrl(String),
    UnknownScheme(String),
    DnsFailed(String),
    ConnectionFailed(String),
    TooManyRedirects,
    BadStatus,
    BadHeader,
    Io(IoError),
    Tls(TlsError),
    TlsHandshake(HandshakeError<TcpStream>),
}
Expand description

Errors that are translated to “synthetic” responses.

Variants§

§

BadUrl(String)

The url could not be understood. Synthetic error 400.

§

UnknownScheme(String)

The url scheme could not be understood. Synthetic error 400.

§

DnsFailed(String)

DNS lookup failed. Synthetic error 400.

§

ConnectionFailed(String)

Connection to server failed. Synthetic error 500.

§

TooManyRedirects

Too many redirects. Synthetic error 500.

§

BadStatus

A status line we don’t understand HTTP/1.1 200 OK. Synthetic error 500.

§

BadHeader

A header line that couldn’t be parsed. Synthetic error 500.

§

Io(IoError)

Some unspecified std::io::Error. Synthetic error 500.

§

Tls(TlsError)

Some unspecified TLS error. Synthetic error 400.

§

TlsHandshake(HandshakeError<TcpStream>)

Some unspecified TLS handshake error. Synthetic error 500.

Implementations§

For synthetic responses, this is the error code.

For synthetic responses, this is the status text.

For synthetic responses, this is the body text.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts this type into the (usually inferred) input type.

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

Returns the argument unchanged.

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.