pub enum MiddlewareAction<T> {
Continue(T),
Retry(Box<Request>, Duration),
Drop,
ReturnResponse(Response),
}Expand description
Enum returned by middleware methods to control further processing.
Variants§
Continue(T)
Continue processing with the provided item.
Retry(Box<Request>, Duration)
Retry the Request after the specified duration. (Only valid for Response processing)
Drop
Drop the item, stopping further processing.
ReturnResponse(Response)
Return a Response directly, bypassing the downloader. (Only valid for Request processing)
Auto Trait Implementations§
impl<T> !Freeze for MiddlewareAction<T>
impl<T> !RefUnwindSafe for MiddlewareAction<T>
impl<T> Send for MiddlewareAction<T>where
T: Send,
impl<T> Sync for MiddlewareAction<T>where
T: Sync,
impl<T> Unpin for MiddlewareAction<T>where
T: Unpin,
impl<T> UnwindSafe for MiddlewareAction<T>where
T: 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