pub struct RateLimitInstance { /* private fields */ }Expand description
An implementation of the RateLimit trait. For creating a new instance, use the RateLimitBuilder.
Trait Implementations§
Source§impl RateLimit for RateLimitInstance
impl RateLimit for RateLimitInstance
Source§async fn is_allowed(
&self,
group_selector: &str,
bucket_selector: &str,
increment: usize,
) -> Result<RateLimitResult, RateLimitError>
async fn is_allowed( &self, group_selector: &str, bucket_selector: &str, increment: usize, ) -> Result<RateLimitResult, RateLimitError>
Check if a request should be allowed based on rate limiting rules. Read more
Auto Trait Implementations§
impl Freeze for RateLimitInstance
impl !RefUnwindSafe for RateLimitInstance
impl !Send for RateLimitInstance
impl !Sync for RateLimitInstance
impl Unpin for RateLimitInstance
impl UnsafeUnpin for RateLimitInstance
impl !UnwindSafe for RateLimitInstance
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