Trait PolicyExt
pub trait PolicyExt
An extension trait for Policy that provides additional adapters.
Required Methods
fn and<P, B, E>(self, other: P) -> And<Self, P> where Self: Policy<B, E> + Sized, P: Policy<B, E>,Create a new
Policythat returnsAction::Followonly ifselfandotherreturnAction::Follow.[
clone_body][Policy::clone_body] method of the returnedPolicytries to clone the body with both policies.Example
use Bytes; use Full; use ; let policy = default.;fn or<P, B, E>(self, other: P) -> Or<Self, P> where Self: Policy<B, E> + Sized, P: Policy<B, E>,Create a new
Policythat returnsAction::Followif eitherselforotherreturnsAction::Follow.[
clone_body][Policy::clone_body] method of the returnedPolicytries to clone the body with both policies.Example
use ; let policy = default.;
Implementors
impl<T> PolicyExt for Action where T: ?Sized,impl<T> PolicyExt for And<A, B> where T: ?Sized,impl<T> PolicyExt for Attempt<'a> where T: ?Sized,impl<T> PolicyExt for ClassifiedResponse<FailureClass, ClassifyEos> where T: ?Sized,impl<T> PolicyExt for CloneBodyFn<F> where T: ?Sized,impl<T> PolicyExt for FilterCredentials where T: ?Sized,impl<T> PolicyExt for FollowRedirect<S, P> where T: ?Sized,impl<T> PolicyExt for FollowRedirectLayer<P> where T: ?Sized,impl<T> PolicyExt for GrpcCode where T: ?Sized,impl<T> PolicyExt for GrpcEosErrorsAsFailures where T: ?Sized,impl<T> PolicyExt for GrpcErrorsAsFailures where T: ?Sized,impl<T> PolicyExt for GrpcFailureClass where T: ?Sized,impl<T> PolicyExt for LatencyUnit where T: ?Sized,impl<T> PolicyExt for Limited where T: ?Sized,impl<T> PolicyExt for MapFailureClass<C, F> where T: ?Sized,impl<T> PolicyExt for NeverClassifyEos<T> where T: ?Sized,impl<T> PolicyExt for Or<A, B> where T: ?Sized,impl<T> PolicyExt for RedirectFn<F> where T: ?Sized,impl<T> PolicyExt for RequestUri where T: ?Sized,impl<T> PolicyExt for ResponseFuture<S, B, P> where T: ?Sized,impl<T> PolicyExt for SameOrigin where T: ?Sized,impl<T> PolicyExt for ServerErrorsAsFailures where T: ?Sized,impl<T> PolicyExt for ServerErrorsFailureClass where T: ?Sized,impl<T> PolicyExt for SharedClassifier<C> where T: ?Sized,impl<T> PolicyExt for StatusInRangeAsFailures where T: ?Sized,impl<T> PolicyExt for StatusInRangeFailureClass where T: ?Sized,impl<T> PolicyExt for T where T: ?Sized,