pub struct Error { /* private fields */ }Implementations§
Source§impl Error
impl Error
pub fn is_timeout(&self) -> bool
pub fn is_connect(&self) -> bool
pub fn is_status(&self) -> bool
pub fn is_retryable(&self) -> bool
pub fn is_body_limit(&self) -> bool
pub fn is_proxy(&self) -> bool
Source§impl Error
impl Error
pub fn headers(&self) -> Option<&HeaderMap>
pub fn header(&self, name: &str) -> Option<&str>
pub fn attempts(&self) -> u32
pub fn proxy(&self) -> Option<&str>
pub fn retries_exhausted(&self) -> bool
pub fn body(&self) -> Option<&[u8]>
pub fn body_text(&self) -> Option<Cow<'_, str>>
pub fn retry_after(&self) -> Option<Duration>
pub fn find<'a>(error: &'a (dyn StdError + 'static)) -> Option<&'a Error>
pub fn kind(&self) -> Kind
pub fn status(&self) -> Option<StatusCode>
pub fn url(&self) -> Option<&Url>
pub fn io(&self) -> Option<&Error>
pub fn tls(&self) -> Option<&TlsError>
pub fn h2(&self) -> Option<&H2Error>
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<InvalidHeaderName> for Error
impl From<InvalidHeaderName> for Error
Source§fn from(e: InvalidHeaderName) -> Self
fn from(e: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(e: InvalidHeaderValue) -> Self
fn from(e: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
Source§fn from(e: InvalidUri) -> Self
fn from(e: InvalidUri) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more