pub struct RedisBarnacleStore { /* private fields */ }
Expand description
Implementation of BarnacleStore using Redis with connection pooling. This struct encapsulates Arc internally, so consumers don’t need to wrap it.
Implementations§
Trait Implementations§
Source§impl BarnacleStore for RedisBarnacleStore
impl BarnacleStore for RedisBarnacleStore
Source§fn increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 BarnacleContext,
config: &'life2 BarnacleConfig,
) -> Pin<Box<dyn Future<Output = Result<BarnacleResult, BarnacleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 BarnacleContext,
config: &'life2 BarnacleConfig,
) -> Pin<Box<dyn Future<Output = Result<BarnacleResult, BarnacleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Increments the counter for the key and returns the current number of requests and remaining time until reset.
Source§fn reset<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 BarnacleContext,
) -> Pin<Box<dyn Future<Output = Result<(), BarnacleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reset<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 BarnacleContext,
) -> Pin<Box<dyn Future<Output = Result<(), BarnacleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resets the counter for the key (e.g., after successful login).
Source§impl Clone for RedisBarnacleStore
impl Clone for RedisBarnacleStore
Source§fn clone(&self) -> RedisBarnacleStore
fn clone(&self) -> RedisBarnacleStore
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 moreAuto Trait Implementations§
impl Freeze for RedisBarnacleStore
impl !RefUnwindSafe for RedisBarnacleStore
impl Send for RedisBarnacleStore
impl Sync for RedisBarnacleStore
impl Unpin for RedisBarnacleStore
impl !UnwindSafe for RedisBarnacleStore
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