Struct bitbazaar::redis::RedisBatch

source ·
pub struct RedisBatch<'a, 'b, 'c, ReturnType> { /* private fields */ }
Expand description

A command builder struct. Committed with RedisBatch::fire.

Batched commands are run in order, but other commands from different sources may be interleaved. Note each command may be run twice, if scripts needed caching to redis.

Implementations§

source§

impl<'a, 'b, 'c, ReturnType> RedisBatch<'a, 'b, 'c, ReturnType>

source

pub fn script_no_return(self, script_invokation: RedisScriptInvoker<'c>) -> Self

Run an arbitrary redis (lua script). But discards any return value.

source

pub fn expire(self, namespace: &str, key: &str, ttl: Duration) -> Self

Expire an existing key with a new/updated ttl.

https://redis.io/commands/pexpire/

source

pub fn zadd( self, set_namespace: &str, set_key: &str, set_ttl: Option<Duration>, score: i64, value: impl ToRedisArgs, ) -> Self

Add an entry to an ordered set (auto creating the set if it doesn’t exist). https://redis.io/commands/zadd/

Arguments:

  • set_namespace: The namespace of the set.
  • set_key: The key of the set.
  • set_ttl: The time to live of the set. This will reset on each addition, meaning after the last update the set will expire after this time.
  • score: The score of the entry.
  • value: The value of the entry. (values of sets must be strings)
source

pub fn zrem<T: ToRedisArgs>( self, set_namespace: &str, set_key: &str, values: impl IntoIterator<Item = T>, ) -> Self

remove an entries from an ordered set. https://redis.io/commands/zrem/

Arguments:

  • set_namespace: The namespace of the set.
  • set_key: The key of the set.
  • values: The values to remove as an iterator.
source

pub fn zadd_multi( self, set_namespace: &str, set_key: &str, set_ttl: Option<Duration>, items: &[(i64, impl ToRedisArgs)], ) -> Self

Add multiple entries at once to an ordered set (auto creating the set if it doesn’t exist). https://redis.io/commands/zadd/

Arguments:

  • set_namespace: The namespace of the set.
  • set_key: The key of the set.
  • set_ttl: The time to live of the set. This will reset on each addition, meaning after the last update the set will expire after this time.
  • items: The scores and values of the entries. (set values must be strings)
source

pub fn zremrangebyscore( self, set_namespace: &str, set_key: &str, min: i64, max: i64, ) -> Self

Remove entries from an ordered set by score range. (range is inclusive)

https://redis.io/commands/zremrangebyscore/

source

pub fn set<T: ToRedisArgs>( self, namespace: &str, key: &str, value: T, expiry: Option<Duration>, ) -> Self

Set a key to a value with an optional expiry.

(expiry accurate to the millisecond)

source

pub fn mset<Value: ToRedisArgs>( self, namespace: &str, pairs: impl IntoIterator<Item = (impl AsRef<str>, Value)>, expiry: Option<Duration>, ) -> Self

Set multiple values (MSET) of the same type at once. If expiry used will use a custom lua script to achieve the functionality.

(expiry accurate to the millisecond)

source

pub fn clear<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self

Clear one or more keys.

source

pub fn clear_namespace(self, namespace: &str) -> Self

Clear all keys under a given namespace

Trait Implementations§

source§

impl<'a, 'b, 'c> RedisBatchFire for RedisBatch<'a, 'b, 'c, ()>

§

type ReturnType = ()

The final return type of the batch.
source§

async fn fire(self) -> Option<()>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B)>

§

type ReturnType = (A, B)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C)>

§

type ReturnType = (A, B, C)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D)>

§

type ReturnType = (A, B, C, D)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E)>

§

type ReturnType = (A, B, C, D, E)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F)>

§

type ReturnType = (A, B, C, D, E, F)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G)>

§

type ReturnType = (A, B, C, D, E, F, G)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H)>

§

type ReturnType = (A, B, C, D, E, F, G, H)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G, H)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I)>

§

type ReturnType = (A, B, C, D, E, F, G, H, I)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G, H, I)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J)>

§

type ReturnType = (A, B, C, D, E, F, G, H, I, J)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G, H, I, J)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue, K: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K)>

§

type ReturnType = (A, B, C, D, E, F, G, H, I, J, K)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G, H, I, J, K)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue, K: FromRedisValue, L: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K, L)>

§

type ReturnType = (A, B, C, D, E, F, G, H, I, J, K, L)

The final return type of the batch.
source§

async fn fire(self) -> Option<(A, B, C, D, E, F, G, H, I, J, K, L)>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c, R: FromRedisValue> RedisBatchFire for RedisBatch<'a, 'b, 'c, (R,)>

§

type ReturnType = R

The final return type of the batch.
source§

async fn fire(self) -> Option<R>

Commit the batch and return the result. If redis unavailable, or the types didn’t match causing decoding to fail, None will be returned and the error logged.
source§

impl<'a, 'b, 'c> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, ()>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (T,)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A,)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue, K: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

impl<'a, 'b, 'c, A: FromRedisValue, B: FromRedisValue, C: FromRedisValue, D: FromRedisValue, E: FromRedisValue, F: FromRedisValue, G: FromRedisValue, H: FromRedisValue, I: FromRedisValue, J: FromRedisValue, K: FromRedisValue, L: FromRedisValue> RedisBatchReturningOps<'c> for RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K, L)>

§

type NextType<T> = RedisBatch<'a, 'b, 'c, (A, B, C, D, E, F, G, H, I, J, K, L, T)>

The producer for the next batch struct sig.
source§

fn script<ScriptOutput: FromRedisValue>( self, script_invokation: RedisScriptInvoker<'c>, ) -> Self::NextType<ScriptOutput>

Run an arbitrary redis (lua script).
source§

fn exists(self, namespace: &str, key: &str) -> Self::NextType<bool>

Check if a key exists.
source§

fn mexists<'key>( self, namespace: &str, keys: impl IntoIterator<Item = &'key str>, ) -> Self::NextType<Vec<bool>>

Check if multiple keys exists.
source§

fn get<Value: FromRedisValue>( self, namespace: &str, key: &str, ) -> Self::NextType<Option<Value>>

Get a value from a key. Returning None if the key doesn’t exist.
source§

fn mget<Value>( self, namespace: &str, keys: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self::NextType<Vec<Option<Value>>>

Get multiple values (MGET) of the same type at once. Returning None for each key that didn’t exist.
source§

fn zrangebyscore_high_to_low<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

HIGHEST TO LOWEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more
source§

fn zrangebyscore_low_to_high<Value: FromRedisValue>( self, set_namespace: &str, set_key: &str, min: i64, max: i64, limit: Option<isize>, ) -> Self::NextType<Vec<(Option<Value>, i64)>>

LOWEST TO HIGHEST SCORES. Retrieve entries from an ordered set by score range. (range is inclusive) Items that cannot be decoded into the specified type are returned as None. Read more

Auto Trait Implementations§

§

impl<'a, 'b, 'c, ReturnType> Freeze for RedisBatch<'a, 'b, 'c, ReturnType>

§

impl<'a, 'b, 'c, ReturnType> !RefUnwindSafe for RedisBatch<'a, 'b, 'c, ReturnType>

§

impl<'a, 'b, 'c, ReturnType> Send for RedisBatch<'a, 'b, 'c, ReturnType>
where ReturnType: Send,

§

impl<'a, 'b, 'c, ReturnType> Sync for RedisBatch<'a, 'b, 'c, ReturnType>
where ReturnType: Sync,

§

impl<'a, 'b, 'c, ReturnType> Unpin for RedisBatch<'a, 'b, 'c, ReturnType>
where ReturnType: Unpin,

§

impl<'a, 'b, 'c, ReturnType> !UnwindSafe for RedisBatch<'a, 'b, 'c, ReturnType>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more