pub struct LimitLayer<P> { /* private fields */ }
Available on crate feature
limit
only.Expand description
Limit requests based on a policy
Implementations§
Source§impl<P> LimitLayer<P>
impl<P> LimitLayer<P>
Sourcepub fn new(policy: P) -> Self
pub fn new(policy: P) -> Self
Creates a new LimitLayer
from a crate::limit::Policy
.
Trait Implementations§
Source§impl<P: Debug> Debug for LimitLayer<P>
impl<P: Debug> Debug for LimitLayer<P>
Auto Trait Implementations§
impl<P> Freeze for LimitLayer<P>where
P: Freeze,
impl<P> RefUnwindSafe for LimitLayer<P>where
P: RefUnwindSafe,
impl<P> Send for LimitLayer<P>where
P: Send,
impl<P> Sync for LimitLayer<P>where
P: Sync,
impl<P> Unpin for LimitLayer<P>where
P: Unpin,
impl<P> UnwindSafe for LimitLayer<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