Module policy
Expand description
Tools for customizing the behavior of a FollowRedirect
middleware.
Structs§
- And
- A redirection
Policy
that combines the results of twoPolicy
s. - Attempt
- A type that holds information on a redirection attempt.
- Clone
Body Fn - A redirection
Policy
created from a closure. - Filter
Credentials - A redirection
Policy
that removes credentials from requests in redirections. - Limited
- A redirection
Policy
that limits the number of successive redirections. - Or
- A redirection
Policy
that combines the results of twoPolicy
s. - Redirect
Fn - A redirection
Policy
created from a closure. - Same
Origin - A redirection
Policy
that stops cross-origin redirections.
Enums§
- Action
- A value returned by
Policy::redirect
which indicates the actionFollowRedirect
should take for a redirection response.
Traits§
- Policy
- Trait for the policy on handling redirection responses.
- Policy
Ext - An extension trait for
Policy
that provides additional adapters.
Functions§
- clone_
body_ fn - Create a new redirection
Policy
from a closureF: Fn(&B) -> Option<B>
. - redirect_
fn - Create a new redirection
Policy
from a closureF: FnMut(&Attempt<'_>) -> Result<Action, E>
.