#[repr(C, u8)]pub enum HttpError {
InvalidUrl(AzString),
ConnectionFailed(AzString),
Timeout,
TlsError(AzString),
HttpStatus(HttpStatusError),
IoError(AzString),
ResponseTooLarge(HttpResponseTooLargeError),
Other(AzString),
}Expand description
HTTP error types (C-compatible)
Variants§
InvalidUrl(AzString)
Invalid URL format
ConnectionFailed(AzString)
Connection failed
Timeout
Request timed out
TlsError(AzString)
TLS/SSL error
HttpStatus(HttpStatusError)
HTTP error response (4xx, 5xx)
IoError(AzString)
I/O error during request
ResponseTooLarge(HttpResponseTooLargeError)
Response body too large
Other(AzString)
Other error
Implementations§
Source§impl HttpError
impl HttpError
pub const fn invalid_url(url: AzString) -> Self
pub const fn connection_failed(msg: AzString) -> Self
pub const fn tls_error(msg: AzString) -> Self
pub const fn http_status(status_code: u16, message: AzString) -> Self
pub const fn io_error(msg: AzString) -> Self
pub const fn response_too_large(max_size: u64, actual_size: u64) -> Self
pub const fn other(msg: AzString) -> Self
Trait Implementations§
impl Eq for HttpError
Source§impl Error for HttpError
Available on crate feature std only.
impl Error for HttpError
Available on crate feature
std only.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()
impl StructuralPartialEq for HttpError
Auto Trait Implementations§
impl Freeze for HttpError
impl RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnsafeUnpin for HttpError
impl UnwindSafe for HttpError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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