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.
TooManyRedirectsToo many redirects. Synthetic error 500.
BadStatusA status line we don't understand HTTP/1.1 200 OK. Synthetic error 500.
BadHeaderA 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 Errorpub fn status(&self) -> u16[src]
pub fn status(&self) -> u16For synthetic responses, this is the error code.
pub fn status_text(&self) -> &str[src]
pub fn status_text(&self) -> &strFor synthetic responses, this is the status text.
pub fn body_text(&self) -> String[src]
pub fn body_text(&self) -> StringFor synthetic responses, this is the body text.
Trait Implementations
impl Into<Response> for Error[src]
impl Into<Response> for Errorimpl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<IoError> for Error[src]
impl From<IoError> for Errorimpl From<TlsError> for Error[src]
impl From<TlsError> for Errorimpl From<HandshakeError<TcpStream>> for Error[src]
impl From<HandshakeError<TcpStream>> for Errorfn from(err: HandshakeError<TcpStream>) -> Error[src]
fn from(err: HandshakeError<TcpStream>) -> ErrorPerforms the conversion.