Enum tower_http::follow_redirect::policy::Action
source · 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 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