pub trait RedirectPredicate:
Clone
+ Send
+ Sync
+ 'static {
// Required method
fn should_follow(
&self,
target: &Target,
method: &Method,
uri: &Uri,
headers: &HeaderMap,
) -> bool;
}Available on crate feature
client only.Expand description
Predicate used by FollowRedirect to decide whether a request should enter redirect
following.
The predicate is checked before the initial request and before every follow-up redirect hop.
If it returns false for the initial request, the layer directly passes the request to the
inner service without cloning the request head for replay.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".