pub struct HttpNotSuccessful {
pub code: u32,
pub url: String,
pub ip: Option<String>,
pub body: Vec<u8>,
pub headers: Vec<String>,
}Fields§
§code: u32§url: String§ip: Option<String>§body: Vec<u8>§headers: Vec<String>Implementations§
Source§impl HttpNotSuccessful
impl HttpNotSuccessful
pub fn new_from_handle( handle: &mut Easy, initial_url: &str, body: Vec<u8>, headers: Vec<String>, ) -> HttpNotSuccessful
pub fn new_from_response( response: Response<Vec<u8>>, url: &str, ) -> HttpNotSuccessful
Sourcepub fn display_short(&self) -> String
pub fn display_short(&self) -> String
Renders the error in a compact form.
fn render(&self, show_headers: bool) -> String
Trait Implementations§
Source§impl Debug for HttpNotSuccessful
impl Debug for HttpNotSuccessful
Source§impl Display for HttpNotSuccessful
impl Display for HttpNotSuccessful
Source§impl Error for HttpNotSuccessful
impl Error for HttpNotSuccessful
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + '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()
Auto Trait Implementations§
impl Forget for HttpNotSuccessful
impl Freeze for HttpNotSuccessful
impl Move for HttpNotSuccessful
impl RefUnwindSafe for HttpNotSuccessful
impl Send for HttpNotSuccessful
impl Sync for HttpNotSuccessful
impl Unpin for HttpNotSuccessful
impl UnsafeUnpin for HttpNotSuccessful
impl UnwindSafe for HttpNotSuccessful
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<T> ErrorExt for T
impl<T> ErrorExt for T
§fn raise(self) -> Errorwhere
Self: Sized,
fn raise(self) -> Errorwhere
Self: Sized,
Raise this error at the caller’s location, returning a public [
Error].
An existing [Error] is returned unchanged, preserving its representation and allocation.§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Raise this error as a typed exception, retaining
Self even when it is already an [Error].§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Like [
Self::and_raise()], retaining the context’s type in an exception.§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
Raise this error as a new exception, with type erasure.
Tree-backed [
crate::Error] values reuse their existing frame and caller location.§fn raise_all<T, I>(self, sources: I) -> Exn<Self>where
Self: Sized,
T: Error + Send + Sync + 'static,
I: IntoIterator,
<I as IntoIterator>::Item: Into<Exn<T>>,
fn raise_all<T, I>(self, sources: I) -> Exn<Self>where
Self: Sized,
T: Error + Send + Sync + 'static,
I: IntoIterator,
<I as IntoIterator>::Item: Into<Exn<T>>,
Raise this error as a new exception, with
sources as causes.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes