pub enum RetryableError<E> {
RateLimited {
after: Duration,
error: E,
},
Fatal(E),
}Expand description
One attempt’s outcome for retry_rate_limited, returned by the
caller’s per-attempt closure.
Variants§
RateLimited
The platform signaled a rate limit. Wait after, then retry; error
is what retry_rate_limited returns if this was the last allowed
attempt.
Fields
§
after: DurationHow long to wait before the next attempt (from the platform’s
Retry-After or equivalent, or a caller-chosen default when the
platform didn’t say).
§
error: EThe error to surface if retries are exhausted while still rate limited.
Fatal(E)
Not retryable — surface immediately without waiting.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for RetryableError<E>where
E: Freeze,
impl<E> RefUnwindSafe for RetryableError<E>where
E: RefUnwindSafe,
impl<E> Send for RetryableError<E>where
E: Send,
impl<E> Sync for RetryableError<E>where
E: Sync,
impl<E> Unpin for RetryableError<E>where
E: Unpin,
impl<E> UnsafeUnpin for RetryableError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for RetryableError<E>where
E: UnwindSafe,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request