pub enum Action {
Follow,
Stop,
}
Available on crate feature
follow-redirect
only.Expand description
A value returned by Policy::redirect
which indicates the action
FollowRedirect
should take for a redirection response.
Variants§
Follow
Follow the redirection.
Stop
Do not follow the redirection, and return the redirection response as-is.
Implementations§
Trait Implementations§
Source§impl<B, E> Policy<B, E> for Action
impl<B, E> Policy<B, E> for Action
Source§fn redirect(&mut self, _: &Attempt<'_>) -> Result<Action, E>
fn redirect(&mut self, _: &Attempt<'_>) -> Result<Action, E>
Invoked when the service received a response with a redirection status code (
3xx
). Read moreSource§fn on_request(&mut self, _request: &mut Request<B>)
fn on_request(&mut self, _request: &mut Request<B>)
Invoked right before the service makes a request, regardless of whether it is redirected
or not. Read more
impl Copy for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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