pub struct InterceptorMut<'a>(/* private fields */);Expand description
A mutator for modifying the Interceptor of an Adapter.
Implementations§
Source§impl<'a> InterceptorMut<'a>
impl<'a> InterceptorMut<'a>
Sourcepub fn set<I>(&mut self, new: I)where
I: Interceptor,
pub fn set<I>(&mut self, new: I)where
I: Interceptor,
Set a new interceptor, discarding the old one.
Sourcepub fn chain_before<I>(&mut self, before: I)where
I: Interceptor,
pub fn chain_before<I>(&mut self, before: I)where
I: Interceptor,
Chain the given Interceptor before the one currently in the adapter.
Equivalent to set(before) if the adapter does not have an interceptor or was constructed
with NoIntercept as the interceptor.
Sourcepub fn chain_after<I>(&mut self, after: I)where
I: Interceptor,
pub fn chain_after<I>(&mut self, after: I)where
I: Interceptor,
Chain the given Interceptor after the one currently in the adapter.
Equivalent to set(after) if the adapter does not have an interceptor or was constructed
with NoIntercept as the interceptor.
Sourcepub fn chain_around<I1, I2>(&mut self, before: I1, after: I2)where
I1: Interceptor,
I2: Interceptor,
pub fn chain_around<I1, I2>(&mut self, before: I1, after: I2)where
I1: Interceptor,
I2: Interceptor,
Chain the given Interceptors before and after the one currently in the adapter.
This saves a level of boxing over calling chain_before() and chain_after()
separately.
Equivalent to set(before.chain(after)) if the adapter does not have an interceptor or
was constructed with NoIntercept as the interceptor.