pub struct DelayLayerWith<P> { /* private fields */ }Available on crate feature
tower-delay only.Expand description
Conditional delay Layer, applies delay based on a predicate.
Created via DelayLayer::when.
Implementations§
Source§impl<P> DelayLayerWith<P>
impl<P> DelayLayerWith<P>
Sourcepub fn new(delay: Duration, predicate: P) -> Self
pub fn new(delay: Duration, predicate: P) -> Self
Creates a new DelayLayerWith.
Trait Implementations§
Source§impl<P: Clone> Clone for DelayLayerWith<P>
impl<P: Clone> Clone for DelayLayerWith<P>
Source§fn clone(&self) -> DelayLayerWith<P>
fn clone(&self) -> DelayLayerWith<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug> Debug for DelayLayerWith<P>
impl<P: Debug> Debug for DelayLayerWith<P>
Auto Trait Implementations§
impl<P> Freeze for DelayLayerWith<P>where
P: Freeze,
impl<P> RefUnwindSafe for DelayLayerWith<P>where
P: RefUnwindSafe,
impl<P> Send for DelayLayerWith<P>where
P: Send,
impl<P> Sync for DelayLayerWith<P>where
P: Sync,
impl<P> Unpin for DelayLayerWith<P>where
P: Unpin,
impl<P> UnwindSafe for DelayLayerWith<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more