pub struct SyncRateLimitAdapter<S>(pub Arc<S>);Available on crate feature
async only.Tuple Fields§
§0: Arc<S>Trait Implementations§
Source§impl<S: RateLimitStore + 'static> AsyncRateLimitStore for SyncRateLimitAdapter<S>
impl<S: RateLimitStore + 'static> AsyncRateLimitStore for SyncRateLimitAdapter<S>
fn check_and_record<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
max_per_window: u32,
window_secs: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, A1StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), A1StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<S> Freeze for SyncRateLimitAdapter<S>
impl<S> RefUnwindSafe for SyncRateLimitAdapter<S>where
S: RefUnwindSafe,
impl<S> Send for SyncRateLimitAdapter<S>
impl<S> Sync for SyncRateLimitAdapter<S>
impl<S> Unpin for SyncRateLimitAdapter<S>
impl<S> UnsafeUnpin for SyncRateLimitAdapter<S>
impl<S> UnwindSafe for SyncRateLimitAdapter<S>where
S: RefUnwindSafe,
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