pub struct RedisStore { /* private fields */ }Expand description
Redis-backed resilience store.
Implementations§
Source§impl RedisStore
impl RedisStore
Sourcepub fn new(url: &str) -> Result<RedisStore, ResilienceError>
pub fn new(url: &str) -> Result<RedisStore, ResilienceError>
Create a new RedisStore from a Redis connection URL.
Trait Implementations§
Source§impl Clone for RedisStore
impl Clone for RedisStore
Source§fn clone(&self) -> RedisStore
fn clone(&self) -> RedisStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ResilienceStore for RedisStore
impl ResilienceStore for RedisStore
fn incr<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, ResilienceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RedisStore: 'async_trait,
fn get_i64<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, ResilienceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RedisStore: 'async_trait,
fn set_ex<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
val: i64,
ttl_seconds: usize,
) -> Pin<Box<dyn Future<Output = Result<(), ResilienceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RedisStore: 'async_trait,
fn del<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ResilienceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RedisStore: 'async_trait,
fn eval_lua<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
script: &'life1 str,
keys: &'life2 [&'life3 str],
args: &'life4 [&'life5 str],
) -> Pin<Box<dyn Future<Output = Result<LuaValue, ResilienceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
RedisStore: 'async_trait,
Auto Trait Implementations§
impl Freeze for RedisStore
impl RefUnwindSafe for RedisStore
impl Send for RedisStore
impl Sync for RedisStore
impl Unpin for RedisStore
impl UnsafeUnpin for RedisStore
impl UnwindSafe for RedisStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more