pub enum HttpError {
Transport(String),
ResponseTooLarge {
limit: usize,
},
DeadlineExceeded {
after: Duration,
},
BlockedDestination(String),
BudgetExhausted {
what: String,
retry_after: Duration,
},
}Variants§
Transport(String)
ResponseTooLarge
The upstream’s response body exceeded the HttpPolicy cap.
DeadlineExceeded
The upstream did not answer within the HttpPolicy deadline and
was abandoned.
BlockedDestination(String)
The destination (or one of its redirect hops) is refused by the outbound policy: scheme, userinfo, or a loopback / private / link-local / metadata address.
BudgetExhausted
The outbound budget refused the request before it reached the wire:
the per-upstream token bucket could not carry its cost within the
wait this client allows, or the per-provider daily quota is spent.
retry_after is when the budget can carry the request again — the
same contract a 429’s Retry-After carries, for a request that was
never sent (issue #765).
Trait Implementations§
Source§impl Error for HttpError
impl Error for HttpError
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 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