pub struct RetryLayer { /* private fields */ }Expand description
Retry middleware.
When the inner application returns a response whose status code is in the
configured list, the request is re-dispatched up to max_retries additional
times. If all attempts return a retryable status the last response is
returned as-is.
Implementations§
Source§impl RetryLayer
impl RetryLayer
Trait Implementations§
Source§impl Default for RetryLayer
impl Default for RetryLayer
Source§impl Middleware for RetryLayer
impl Middleware for RetryLayer
fn handle( &self, request: &Request, connection: &ConnectionInfo, next: &dyn Application, ) -> Result<Response, String>
Auto Trait Implementations§
impl Freeze for RetryLayer
impl RefUnwindSafe for RetryLayer
impl Send for RetryLayer
impl Sync for RetryLayer
impl Unpin for RetryLayer
impl UnsafeUnpin for RetryLayer
impl UnwindSafe for RetryLayer
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