Struct tower_http::follow_redirect::policy::Or
source · pub struct Or<A, B> { /* private fields */ }
Available on crate feature
follow-redirect
only.Expand description
A redirection Policy
that combines the results of two Policy
s.
See PolicyExt::or
for more details.
Trait Implementations§
source§impl<Bd, E, A, B> Policy<Bd, E> for Or<A, B>where
A: Policy<Bd, E>,
B: Policy<Bd, E>,
impl<Bd, E, A, B> Policy<Bd, E> for Or<A, B>where
A: Policy<Bd, E>,
B: Policy<Bd, E>,
source§fn redirect(&mut self, attempt: &Attempt<'_>) -> Result<Action, E>
fn redirect(&mut self, attempt: &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<Bd>)
fn on_request(&mut self, request: &mut Request<Bd>)
Invoked right before the service makes a request, regardless of whether it is redirected
or not. Read more