Enum ureq::Error [−][src]
pub enum Error { BadUrl(String), UnknownScheme(String), DnsFailed(String), ConnectionFailed(String), TooManyRedirects, BadStatus, BadHeader, Io(IoError), Tls(TlsError), TlsHandshake(HandshakeError<TcpStream>), }
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
.
Methods
impl Error
[src]
impl Error
pub fn status(&self) -> u16
[src]
pub fn status(&self) -> u16
For synthetic responses, this is the error code.
pub fn status_text(&self) -> &str
[src]
pub fn status_text(&self) -> &str
For synthetic responses, this is the status text.
pub fn body_text(&self) -> String
[src]
pub fn body_text(&self) -> String
For synthetic responses, this is the body text.
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<IoError> for Error
[src]
impl From<IoError> for Error
impl From<TlsError> for Error
[src]
impl From<TlsError> for Error
impl From<HandshakeError<TcpStream>> for Error
[src]
impl From<HandshakeError<TcpStream>> for Error
fn from(err: HandshakeError<TcpStream>) -> Error
[src]
fn from(err: HandshakeError<TcpStream>) -> Error
Performs the conversion.
impl Into<Response> for Error
[src]
impl Into<Response> for Error