[][src]Struct fred::client::RedisClient

pub struct RedisClient { /* fields omitted */ }

A Redis client struct.

See the documentation for the Borrowed and Owned traits for how to execute commands against the server. Depending on your use case it may be beneficial to use different interfaces for different use cases, and this library supports both an owned interface and a borrowed interface via different traits. Both traits implement the same high level interface, but provide flexibility for use cases where taking ownership over the client may be limited vs use cases where owning the client instance may be preferred.

Methods

impl RedisClient[src]

pub fn new(config: RedisConfig, timer: Option<Timer>) -> RedisClient[src]

Create a new RedisClient instance without connecting.

pub fn read_redelivery_count(&self) -> usize[src]

Read the number of request redeliveries.

This is the number of times a request had to be sent again due to a connection closing while waiting on a response.

pub fn take_redelivery_count(&self) -> usize[src]

Read and reset the number of request redeliveries.

pub fn state(&self) -> ClientState[src]

Read the state of the underlying connection.

pub fn read_latency_metrics(&self) -> DistributionStats[src]

Read latency metrics across all commands.

pub fn take_latency_metrics(&self) -> DistributionStats[src]

Read and consume latency metrics, resetting their values afterwards.

pub fn read_req_size_metrics(&self) -> DistributionStats[src]

Read request payload size metrics across all commands.

pub fn take_req_size_metrics(&self) -> DistributionStats[src]

Read and consume request payload size metrics, resetting their values afterwards.

pub fn read_res_size_metrics(&self) -> DistributionStats[src]

Read response payload size metrics across all commands.

pub fn take_res_size_metrics(&self) -> DistributionStats[src]

Read and consume response payload size metrics, resetting their values afterwards.

pub fn command_queue_len(&self) -> usize[src]

Read the number of buffered commands waiting to be sent to the server.

pub fn connect(&self, handle: &Handle) -> ConnectionFuture[src]

Connect to the Redis server. The returned future will resolve when the connection to the Redis server has been fully closed by both ends.

The on_connect function can be used to be notified when the client first successfully connects.

pub fn connect_with_policy(
    &self,
    handle: &Handle,
    policy: ReconnectPolicy
) -> ConnectionFuture
[src]

Connect to the Redis server with a ReconnectPolicy to apply if the connection closes due to an error. The returned future will resolve when max_attempts is reached on the ReconnectPolicy.

Use the on_error and on_reconnect functions to be notified when the connection dies or successfully reconnects. Note that when the client automatically reconnects it will not re-select the previously selected database, nor will it re-subscribe to any pubsub channels. Use on_reconnect to implement that functionality if needed.

Additionally, on_connect can be used to be notified when the client first successfully connects, since sometimes some special initialization is needed upon first connecting.

pub fn on_reconnect(&self) -> Box<dyn Stream<Item = Self, Error = RedisError>>[src]

Listen for successful reconnection notifications. When using a config with a ReconnectPolicy the future returned by connect_with_policy will not resolve until max_attempts is reached, potentially running forever if set to 0. This function can be used to receive notifications whenever the client successfully reconnects in order to select the right database again, re-subscribe to channels, etc. A reconnection event is also triggered upon first connecting.

pub fn on_connect(&self) -> Box<dyn Future<Item = Self, Error = RedisError>>[src]

Returns a future that resolves when the client connects to the server. If the client is already connected this future will resolve immediately.

This can be used with on_reconnect to separate initialization logic that needs to occur only on the first connection vs subsequent connections.

pub fn on_error(&self) -> Box<dyn Stream<Item = RedisError, Error = RedisError>>[src]

Listen for protocol and connection errors. This stream can be used to more intelligently handle errors that may not appear in the request-response cycle, and so cannot be handled by response futures.

Similar to on_message, this function does not need to be called again if the connection goes down.

pub fn on_message(
    &self
) -> Box<dyn Stream<Item = (String, RedisValue), Error = RedisError>>
[src]

Listen for (channel, message) tuples on the PubSub interface.

If the connection to the Redis server goes down for any reason this function does not need to be called again. Messages will start appearing on the original stream after subscribe is called again.

pub fn is_clustered(&self) -> bool[src]

Whether or not the client is using a clustered Redis deployment.

pub fn split_cluster(
    &self,
    handle: &Handle
) -> Box<dyn Future<Item = Vec<(RedisClient, RedisConfig)>, Error = RedisError>>
[src]

Split a clustered redis client into a list of centralized clients for each master node in the cluster.

This is an expensive operation and should not be used frequently.

pub fn scan<P: Into<String>>(
    &self,
    pattern: Option<P>,
    count: Option<usize>,
    _type: Option<ScanType>
) -> Box<dyn Stream<Item = ScanResult, Error = RedisError>>
[src]

Scan the redis database for keys matching the given pattern, if any. The scan operation can be canceled by dropping the returned stream.

https://redis.io/commands/scan

pub fn hscan<K: Into<RedisKey>, P: Into<String>>(
    &self,
    key: K,
    pattern: Option<P>,
    count: Option<usize>
) -> Box<dyn Stream<Item = HScanResult, Error = RedisError>>
[src]

Scan the redis database for keys within the given hash key, if any. The scan operation can be canceled by dropping the returned stream.

https://redis.io/commands/hscan

pub fn sscan<K: Into<RedisKey>, P: Into<String>>(
    &self,
    key: K,
    pattern: Option<P>,
    count: Option<usize>
) -> Box<dyn Stream<Item = SScanResult, Error = RedisError>>
[src]

Scan the redis database for keys within the given set key, if any. The scan operation can be canceled by dropping the returned stream.

https://redis.io/commands/sscan

pub fn zscan<K: Into<RedisKey>, P: Into<String>>(
    &self,
    key: K,
    pattern: Option<P>,
    count: Option<usize>
) -> Box<dyn Stream<Item = ZScanResult, Error = RedisError>>
[src]

Scan the redis database for keys within the given sorted set key, if any. The scan operation can be canceled by dropping the returned stream.

https://redis.io/commands/zscan

Trait Implementations

impl RedisClientBorrowed for RedisClient[src]

fn quit(&self) -> Box<dyn Future<Item = (), Error = RedisError>>[src]

Close the connection to the Redis server. The returned future resolves when the command has been written to the socket, not when the connection has been fully closed. Some time after this future resolves the future returned by connect or connect_with_policy will resolve, and that indicates that the connection has been fully closed.

This function will also close all error, message, and reconnection event streams.

Note: This function will immediately succeed if the client is already disconnected. This is to allow quit to be used a means to break out from reconnect logic. If this function is called while the client is waiting to attempt to reconnect then when it next wakes up to try to reconnect it will instead break out with a RedisErrorKind::Canceled error. This in turn will resolve the future returned by connect or connect_with_policy some time later.

fn flushall(
    &self,
    _async: bool
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Delete the keys in all databases. Returns a string reply.

https://redis.io/commands/flushall

fn set<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V,
    expire: Option<Expiration>,
    options: Option<SetOptions>
) -> Box<dyn Future<Item = bool, Error = RedisError>>
[src]

Set a value at key with optional NX|XX and EX|PX arguments. The bool returned by this function describes whether or not the key was set due to any NX|XX options.

https://redis.io/commands/set

fn get<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Option<RedisValue>, Error = RedisError>>
[src]

Read a value from Redis at key.

https://redis.io/commands/get

fn select(&self, db: u8) -> Box<dyn Future<Item = (), Error = RedisError>>[src]

Select the database this client should use.

https://redis.io/commands/select

fn info(
    &self,
    section: Option<InfoKind>
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Read info about the Redis server.

https://redis.io/commands/info

fn del<K: Into<MultipleKeys>>(
    &self,
    keys: K
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Removes the specified keys. A key is ignored if it does not exist. Returns the number of keys removed.

https://redis.io/commands/del

fn subscribe<T: Into<String>>(
    &self,
    channel: T
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Subscribe to a channel on the PubSub interface. Any messages received before on_message is called will be discarded, so it's usually best to call on_message before calling subscribe for the first time. The usize returned here is the number of channels to which the client is currently subscribed.

https://redis.io/commands/subscribe

fn unsubscribe<T: Into<String>>(
    &self,
    channel: T
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Unsubscribe from a channel on the PubSub interface.

https://redis.io/commands/unsubscribe

fn publish<T: Into<String>, V: Into<RedisValue>>(
    &self,
    channel: T,
    message: V
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Publish a message on the PubSub interface, returning the number of clients that received the message.

https://redis.io/commands/publish

fn decr<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Decrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. Returns error if the key contains a value of the wrong type.

https://redis.io/commands/decr

fn decrby<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Decrements the number stored at key by value argument. If the key does not exist, it is set to 0 before performing the operation. Returns error if the key contains a value of the wrong type.

https://redis.io/commands/decrby

fn incr<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. Returns an error if the value at key is of the wrong type.

https://redis.io/commands/incr

fn incrby<K: Into<RedisKey>>(
    &self,
    key: K,
    incr: i64
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Increments the number stored at key by incr. If the key does not exist, it is set to 0 before performing the operation. Returns an error if the value at key is of the wrong type.

https://redis.io/commands/incrby

fn incrbyfloat<K: Into<RedisKey>>(
    &self,
    key: K,
    incr: f64
) -> Box<dyn Future<Item = f64, Error = RedisError>>
[src]

Increment the string representing a floating point number stored at key by the argument value. If the key does not exist, it is set to 0 before performing the operation. Returns error if key value is wrong type or if the current value or increment value are not parseable as float value.

https://redis.io/commands/incrbyfloat

fn ping(&self) -> Box<dyn Future<Item = String, Error = RedisError>>[src]

Ping the Redis server.

https://redis.io/commands/ping

fn auth<V: Into<String>>(
    &self,
    value: V
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Request for authentication in a password-protected Redis server. Returns ok if successful.

https://redis.io/commands/auth

fn bgrewriteaof(&self) -> Box<dyn Future<Item = String, Error = RedisError>>[src]

Instruct Redis to start an Append Only File rewrite process. Returns ok.

https://redis.io/commands/bgrewriteaof

fn bgsave(&self) -> Box<dyn Future<Item = String, Error = RedisError>>[src]

Save the DB in background. Returns ok.

https://redis.io/commands/bgsave

fn client_list(&self) -> Box<dyn Future<Item = String, Error = RedisError>>[src]

Returns information and statistics about the client connections.

https://redis.io/commands/client-list

fn client_getname(
    &self
) -> Box<dyn Future<Item = Option<String>, Error = RedisError>>
[src]

Returns the name of the current connection as a string, or None if no name is set.

https://redis.io/commands/client-getname

fn client_setname<V: Into<String>>(
    &self,
    name: V
) -> Box<dyn Future<Item = Option<String>, Error = RedisError>>
[src]

Assigns a name to the current connection. Returns ok if successful, None otherwise.

https://redis.io/commands/client-setname

fn dbsize(&self) -> Box<dyn Future<Item = usize, Error = RedisError>>[src]

Return the number of keys in the currently-selected database.

https://redis.io/commands/dbsize

fn dump<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Option<String>, Error = RedisError>>
[src]

Serialize the value stored at key in a Redis-specific format and return it as bulk string. If key does not exist None is returned

https://redis.io/commands/dump

fn exists<K: Into<MultipleKeys>>(
    &self,
    keys: K
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns number of keys that exist from the keys arguments.

https://redis.io/commands/exists

fn expire<K: Into<RedisKey>>(
    &self,
    key: K,
    seconds: i64
) -> Box<dyn Future<Item = bool, Error = RedisError>>
[src]

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. Returns true if timeout set, false if key does not exist.

https://redis.io/commands/expire

fn expire_at<K: Into<RedisKey>>(
    &self,
    key: K,
    timestamp: i64
) -> Box<dyn Future<Item = bool, Error = RedisError>>
[src]

Set a timeout on key based on a UNIX timestamp. After the timeout has expired, the key will automatically be deleted. Returns true if timeout set, false if key does not exist.

https://redis.io/commands/expireat

fn persist<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = bool, Error = RedisError>>
[src]

Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated). Return true if timeout was removed, false if key does not exist

https://redis.io/commands/persist

fn flushdb(
    &self,
    _async: bool
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Delete all the keys in the currently selected database. Returns a string reply.

https://redis.io/commands/flushdb

fn getrange<K: Into<RedisKey>>(
    &self,
    key: K,
    start: usize,
    end: usize
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Returns the substring of the string value stored at key, determined by the offsets start and end (both inclusive). Note: Command formerly called SUBSTR in Redis verison <=2.0.

https://redis.io/commands/getrange

fn getset<V: Into<RedisValue>, K: Into<RedisKey>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = Option<RedisValue>, Error = RedisError>>
[src]

Atomically sets key to value and returns the old value stored at key. Returns error if key does not hold string value. Returns None if key does not exist.

https://redis.io/commands/getset

fn hdel<F: Into<MultipleKeys>, K: Into<RedisKey>>(
    &self,
    key: K,
    fields: F
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Removes the specified fields from the hash stored at key. Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0.

https://redis.io/commands/hdel

fn hexists<F: Into<RedisKey>, K: Into<RedisKey>>(
    &self,
    key: K,
    field: F
) -> Box<dyn Future<Item = bool, Error = RedisError>>
[src]

Returns true if field exists on key.

https://redis.io/commands/hexists

fn hget<F: Into<RedisKey>, K: Into<RedisKey>>(
    &self,
    key: K,
    field: F
) -> Box<dyn Future<Item = Option<RedisValue>, Error = RedisError>>
[src]

Returns the value associated with field in the hash stored at key.

https://redis.io/commands/hget

fn hgetall<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = HashMap<String, RedisValue>, Error = RedisError>>
[src]

Returns all fields and values of the hash stored at key. In the returned value, every field name is followed by its value Returns an empty hashmap if hash is empty.

https://redis.io/commands/hgetall

fn hincrby<F: Into<RedisKey>, K: Into<RedisKey>>(
    &self,
    key: K,
    field: F,
    incr: i64
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Increments the number stored at field in the hash stored at key by incr. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.

https://redis.io/commands/hincrby

fn hincrbyfloat<K: Into<RedisKey>, F: Into<RedisKey>>(
    &self,
    key: K,
    field: F,
    incr: f64
) -> Box<dyn Future<Item = f64, Error = RedisError>>
[src]

Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment. If the field does not exist, it is set to 0 before performing the operation. Returns an error if field value contains wrong type or content/increment are not parsable.

https://redis.io/commands/hincrbyfloat

fn hkeys<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Vec<String>, Error = RedisError>>
[src]

Returns all field names in the hash stored at key. Returns an empty vec if the list is empty. Null fields are converted to "nil".

https://redis.io/commands/hkeys

fn hlen<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns the number of fields contained in the hash stored at key.

https://redis.io/commands/hlen

fn hmget<F: Into<MultipleKeys>, K: Into<RedisKey>>(
    &self,
    key: K,
    fields: F
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns the values associated with the specified fields in the hash stored at key. Values in a returned list may be null.

https://redis.io/commands/hmget

fn hmset<V: Into<RedisValue>, F: Into<RedisKey> + Hash + Eq, K: Into<RedisKey>>(
    &self,
    key: K,
    values: HashMap<F, V>
) -> Box<dyn Future<Item = String, Error = RedisError>>
[src]

Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields already existing in the hash. If key does not exist, a new key holding a hash is created.

https://redis.io/commands/hmset

fn hset<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    field: F,
    value: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. Note: Return value of 1 means new field was created and set. Return of 0 means field already exists and was overwritten.

https://redis.io/commands/hset

fn hsetnx<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    field: F,
    value: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Sets field in the hash stored at key to value, only if field does not yet exist. If key does not exist, a new key holding a hash is created. Note: Return value of 1 means new field was created and set. Return of 0 means no operation performed.

https://redis.io/commands/hsetnx

fn hstrlen<K: Into<RedisKey>, F: Into<RedisKey>>(
    &self,
    key: K,
    field: F
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns the string length of the value associated with field in the hash stored at key. If the key or the field do not exist, 0 is returned.

https://redis.io/commands/hstrlen

fn hvals<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns all values in the hash stored at key. Returns an empty vector if the list is empty.

https://redis.io/commands/hvals

fn llen<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned. An error is returned when the value stored at key is not a list.

https://redis.io/commands/llen

fn lpush<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. When key holds a value that is not a list, an error is returned.

https://redis.io/commands/lpush

fn lpop<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Option<RedisValue>, Error = RedisError>>
[src]

Removes and returns the first element of the list stored at key.

https://redis.io/commands/lpop

fn sadd<K: Into<RedisKey>, V: Into<MultipleValues>>(
    &self,
    key: K,
    values: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Add the specified value to the set stored at key. Values that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified value. An error is returned when the value stored at key is not a set.

https://redis.io/commands/sadd

fn srem<K: Into<RedisKey>, V: Into<MultipleValues>>(
    &self,
    key: K,
    values: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Remove the specified value from the set stored at key. Values that are not a member of this set are ignored. If key does not exist, it is treated as an empty set and this command returns 0. An error is returned when the value stored at key is not a set.

https://redis.io/commands/srem

fn smembers<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns all the members of the set value stored at key. This has the same effect as running SINTER with one argument key.

https://redis.io/commands/smembers

fn psubscribe<K: Into<MultipleKeys>>(
    &self,
    patterns: K
) -> Box<dyn Future<Item = Vec<usize>, Error = RedisError>>
[src]

Subscribes the client to the given patterns.

Returns the subscription count for each of the provided patterns.

https://redis.io/commands/psubscribe

fn punsubscribe<K: Into<MultipleKeys>>(
    &self,
    patterns: K
) -> Box<dyn Future<Item = Vec<usize>, Error = RedisError>>
[src]

Unsubscribes the client from the given patterns, or from all of them if none is given.

Returns the subscription count for each of the provided patterns.

https://redis.io/commands/punsubscribe

fn mget<K: Into<MultipleKeys>>(
    &self,
    keys: K
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns the values of all specified keys.

https://redis.io/commands/mget

fn zadd<K: Into<RedisKey>, V: Into<MultipleZaddValues>>(
    &self,
    key: K,
    options: Option<SetOptions>,
    changed: bool,
    incr: bool,
    values: V
) -> Box<dyn Future<Item = RedisValue, Error = RedisError>>
[src]

Adds all the specified members with the specified scores to the sorted set stored at key.

https://redis.io/commands/zadd

fn zcard<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

https://redis.io/commands/zcard

fn zcount<K: Into<RedisKey>>(
    &self,
    key: K,
    min: f64,
    max: f64
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Returns the number of elements in the sorted set at key with a score between min and max.

https://redis.io/commands/zcount

fn zlexcount<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    &self,
    key: K,
    min: M,
    max: N
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zlexcount

fn zincrby<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    incr: f64,
    value: V
) -> Box<dyn Future<Item = f64, Error = RedisError>>
[src]

Increments the score of member in the sorted set stored at key by increment.

https://redis.io/commands/zincrby

fn zrange<K: Into<RedisKey>>(
    &self,
    key: K,
    start: i64,
    stop: i64,
    with_scores: bool
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns the specified range of elements in the sorted set stored at key.

https://redis.io/commands/zrange

fn zrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    &self,
    key: K,
    min: M,
    max: N,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zrangebylex

fn zrangebyscore<K: Into<RedisKey>>(
    &self,
    key: K,
    min: f64,
    max: f64,
    with_scores: bool,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).

https://redis.io/commands/zrangebyscore

fn zpopmax<K: Into<RedisKey>>(
    &self,
    key: K,
    count: Option<usize>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Removes and returns up to count members with the highest scores in the sorted set stored at key.

https://redis.io/commands/zpopmax

fn zpopmin<K: Into<RedisKey>>(
    &self,
    key: K,
    count: Option<usize>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Removes and returns up to count members with the lowest scores in the sorted set stored at key.

https://redis.io/commands/zpopmin

fn zrank<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = RedisValue, Error = RedisError>>
[src]

Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

https://redis.io/commands/zrank

fn zrem<K: Into<RedisKey>, V: Into<MultipleValues>>(
    &self,
    key: K,
    values: V
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Removes the specified members from the sorted set stored at key. Non existing members are ignored.

https://redis.io/commands/zrem

fn zremrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    &self,
    key: K,
    min: M,
    max: N
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

https://redis.io/commands/zremrangebylex

fn zremrangebyrank<K: Into<RedisKey>>(
    &self,
    key: K,
    start: i64,
    stop: i64
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Removes all elements in the sorted set stored at key with rank between start and stop.

https://redis.io/commands/zremrangebyrank

fn zremrangebyscore<K: Into<RedisKey>>(
    &self,
    key: K,
    min: f64,
    max: f64
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

https://redis.io/commands/zremrangebyscore

fn zrevrange<K: Into<RedisKey>>(
    &self,
    key: K,
    start: i64,
    stop: i64,
    with_scores: bool
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the highest to the lowest score

https://redis.io/commands/zrevrange

fn zrevrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    &self,
    key: K,
    max: M,
    min: N,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.

https://redis.io/commands/zrevrangebylex

fn zrevrangebyscore<K: Into<RedisKey>>(
    &self,
    key: K,
    max: f64,
    min: f64,
    with_scores: bool,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = Vec<RedisValue>, Error = RedisError>>
[src]

Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores.

https://redis.io/commands/zrevrangebyscore

fn zrevrank<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = RedisValue, Error = RedisError>>
[src]

Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

https://redis.io/commands/zrevrank

fn zscore<K: Into<RedisKey>, V: Into<RedisValue>>(
    &self,
    key: K,
    value: V
) -> Box<dyn Future<Item = RedisValue, Error = RedisError>>
[src]

Returns the score of member in the sorted set at key.

https://redis.io/commands/zscore

fn zinterstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(
    &self,
    destination: D,
    keys: K,
    weights: W,
    aggregate: Option<AggregateOptions>
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zinterstore

fn zunionstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(
    &self,
    destination: D,
    keys: K,
    weights: W,
    aggregate: Option<AggregateOptions>
) -> Box<dyn Future<Item = usize, Error = RedisError>>
[src]

Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zunionstore

fn ttl<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.

https://redis.io/commands/ttl

fn pttl<K: Into<RedisKey>>(
    &self,
    key: K
) -> Box<dyn Future<Item = i64, Error = RedisError>>
[src]

Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

https://redis.io/commands/pttl

impl RedisClientOwned for RedisClient[src]

fn get<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Option<RedisValue>), Error = RedisError>>
[src]

Read a value from Redis at key.

https://redis.io/commands/get

fn quit(self) -> Box<dyn Future<Item = Self, Error = RedisError>>[src]

Close the connection to the Redis server. The returned future resolves when the command has been written to the socket, not when the connection has been fully closed. Some time after this future resolves the future returned by connect or connect_with_policy will resolve, and that indicates that the connection has been fully closed.

This function will also close all error, message, and reconnection event streams.

Note: This function will immediately succeed if the client is already disconnected. This is to allow quit to be used a means to break out from reconnect logic. If this function is called while the client is waiting to attempt to reconnect then when it next wakes up to try to reconnect it will instead break out with a RedisErrorKind::Canceled error. This in turn will resolve the future returned by connect or connect_with_policy some time later.

fn flushall(
    self,
    _async: bool
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Delete the keys in all databases. Returns a string reply.

https://redis.io/commands/flushall

fn set<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V,
    expire: Option<Expiration>,
    options: Option<SetOptions>
) -> Box<dyn Future<Item = (Self, bool), Error = RedisError>>
[src]

Set a value at key with optional NX|XX and EX|PX arguments. The bool returned by this function describes whether or not the key was set due to any NX|XX options.

https://redis.io/commands/set

fn select(self, db: u8) -> Box<dyn Future<Item = Self, Error = RedisError>>[src]

Select the database this client should use.

https://redis.io/commands/select

fn info(
    self,
    section: Option<InfoKind>
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Read info about the Redis server.

https://redis.io/commands/info

fn del<K: Into<MultipleKeys>>(
    self,
    keys: K
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Removes the specified keys. A key is ignored if it does not exist. Returns the number of keys removed.

https://redis.io/commands/del

fn subscribe<T: Into<String>>(
    self,
    channel: T
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Subscribe to a channel on the PubSub interface. Any messages received before on_message is called will be discarded, so it's usually best to call on_message before calling subscribe for the first time. The usize returned here is the number of channels to which the client is currently subscribed.

https://redis.io/commands/subscribe

fn unsubscribe<T: Into<String>>(
    self,
    channel: T
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Unsubscribe from a channel on the PubSub interface.

https://redis.io/commands/unsubscribe

fn publish<T: Into<String>, V: Into<RedisValue>>(
    self,
    channel: T,
    message: V
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Publish a message on the PubSub interface, returning the number of clients that received the message.

https://redis.io/commands/publish

fn decr<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Decrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. Returns error if the key contains a value of the wrong type.

https://redis.io/commands/decr

fn decrby<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Decrements the number stored at key by value argument. If the key does not exist, it is set to 0 before performing the operation. Returns error if the key contains a value of the wrong type.

https://redis.io/commands/decrby

fn incr<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. Returns an error if the value at key is of the wrong type.

https://redis.io/commands/incr

fn incrby<K: Into<RedisKey>>(
    self,
    key: K,
    incr: i64
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Increments the number stored at key by incr. If the key does not exist, it is set to 0 before performing the operation. Returns an error if the value at key is of the wrong type.

https://redis.io/commands/incrby

fn incrbyfloat<K: Into<RedisKey>>(
    self,
    key: K,
    incr: f64
) -> Box<dyn Future<Item = (Self, f64), Error = RedisError>>
[src]

Increment the string representing a floating point number stored at key by the argument value. If the key does not exist, it is set to 0 before performing the operation. Returns error if key value is wrong type or if the current value or increment value are not parseable as float value.

https://redis.io/commands/incrbyfloat

fn ping(self) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>[src]

Ping the Redis server.

https://redis.io/commands/ping

fn auth<V: Into<String>>(
    self,
    value: V
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Request for authentication in a password-protected Redis server. Returns ok if successful.

https://redis.io/commands/auth

fn bgrewriteaof(
    self
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Instruct Redis to start an Append Only File rewrite process. Returns ok.

https://redis.io/commands/bgrewriteaof

fn bgsave(self) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>[src]

Save the DB in background. Returns ok.

https://redis.io/commands/bgsave

fn client_list(
    self
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Returns information and statistics about the client connections.

https://redis.io/commands/client-list

fn client_getname(
    self
) -> Box<dyn Future<Item = (Self, Option<String>), Error = RedisError>>
[src]

Returns the name of the current connection as a string, or None if no name is set.

https://redis.io/commands/client-getname

fn client_setname<V: Into<String>>(
    self,
    name: V
) -> Box<dyn Future<Item = (Self, Option<String>), Error = RedisError>>
[src]

Assigns a name to the current connection. Returns ok if successful, None otherwise.

https://redis.io/commands/client-setname

fn dbsize(self) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>[src]

Return the number of keys in the currently-selected database.

https://redis.io/commands/dbsize

fn dump<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Option<String>), Error = RedisError>>
[src]

Serialize the value stored at key in a Redis-specific format and return it as bulk string. If key does not exist None is returned

https://redis.io/commands/dump

fn exists<K: Into<MultipleKeys>>(
    self,
    keys: K
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns number of keys that exist from the keys arguments.

https://redis.io/commands/exists

fn expire<K: Into<RedisKey>>(
    self,
    key: K,
    seconds: i64
) -> Box<dyn Future<Item = (Self, bool), Error = RedisError>>
[src]

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. Returns true if timeout set, false if key does not exist.

https://redis.io/commands/expire

fn expire_at<K: Into<RedisKey>>(
    self,
    key: K,
    timestamp: i64
) -> Box<dyn Future<Item = (Self, bool), Error = RedisError>>
[src]

Set a timeout on key based on a UNIX timestamp. After the timeout has expired, the key will automatically be deleted. Returns true if timeout set, false if key does not exist.

https://redis.io/commands/expireat

fn persist<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, bool), Error = RedisError>>
[src]

Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated). Return true if timeout was removed, false if key does not exist

https://redis.io/commands/persist

fn flushdb(
    self,
    _async: bool
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Delete all the keys in the currently selected database. Returns a string reply.

https://redis.io/commands/flushdb

fn getrange<K: Into<RedisKey>>(
    self,
    key: K,
    start: usize,
    end: usize
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Returns the substring of the string value stored at key, determined by the offsets start and end (both inclusive). Note: Command formerly called SUBSTR in Redis verison <=2.0.

https://redis.io/commands/getrange

fn getset<V: Into<RedisValue>, K: Into<RedisKey>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, Option<RedisValue>), Error = RedisError>>
[src]

Atomically sets key to value and returns the old value stored at key. Returns error if key does not hold string value. Returns None if key does not exist.

https://redis.io/commands/getset

fn hdel<F: Into<MultipleKeys>, K: Into<RedisKey>>(
    self,
    key: K,
    fields: F
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Removes the specified fields from the hash stored at key. Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0.

https://redis.io/commands/hdel

fn hexists<F: Into<RedisKey>, K: Into<RedisKey>>(
    self,
    key: K,
    field: F
) -> Box<dyn Future<Item = (Self, bool), Error = RedisError>>
[src]

Returns true if field exists on key.

https://redis.io/commands/hexists

fn hget<F: Into<RedisKey>, K: Into<RedisKey>>(
    self,
    key: K,
    field: F
) -> Box<dyn Future<Item = (Self, Option<RedisValue>), Error = RedisError>>
[src]

Returns the value associated with field in the hash stored at key.

https://redis.io/commands/hget

fn hgetall<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, HashMap<String, RedisValue>), Error = RedisError>>
[src]

Returns all fields and values of the hash stored at key. In the returned value, every field name is followed by its value Returns an empty hashmap if hash is empty.

https://redis.io/commands/hgetall

fn hincrby<F: Into<RedisKey>, K: Into<RedisKey>>(
    self,
    key: K,
    field: F,
    incr: i64
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Increments the number stored at field in the hash stored at key by incr. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.

https://redis.io/commands/hincrby

fn hincrbyfloat<K: Into<RedisKey>, F: Into<RedisKey>>(
    self,
    key: K,
    field: F,
    incr: f64
) -> Box<dyn Future<Item = (Self, f64), Error = RedisError>>
[src]

Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment. If the field does not exist, it is set to 0 before performing the operation. Returns an error if field value contains wrong type or content/increment are not parsable.

https://redis.io/commands/hincrbyfloat

fn hkeys<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Vec<String>), Error = RedisError>>
[src]

Returns all field names in the hash stored at key. Returns an empty vec if the list is empty. Null fields are converted to "nil".

https://redis.io/commands/hkeys

fn hlen<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns the number of fields contained in the hash stored at key.

https://redis.io/commands/hlen

fn hmget<F: Into<MultipleKeys>, K: Into<RedisKey>>(
    self,
    key: K,
    fields: F
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns the values associated with the specified fields in the hash stored at key. Values in a returned list may be null.

https://redis.io/commands/hmget

fn hmset<V: Into<RedisValue>, F: Into<RedisKey> + Hash + Eq, K: Into<RedisKey>>(
    self,
    key: K,
    values: HashMap<F, V>
) -> Box<dyn Future<Item = (Self, String), Error = RedisError>>
[src]

Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields already existing in the hash. If key does not exist, a new key holding a hash is created.

https://redis.io/commands/hmset

fn hset<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    field: F,
    value: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. Note: Return value of 1 means new field was created and set. Return of 0 means field already exists and was overwritten.

https://redis.io/commands/hset

fn hsetnx<K: Into<RedisKey>, F: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    field: F,
    value: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Sets field in the hash stored at key to value, only if field does not yet exist. If key does not exist, a new key holding a hash is created. Note: Return value of 1 means new field was created and set. Return of 0 means no operation performed.

https://redis.io/commands/hsetnx

fn hstrlen<K: Into<RedisKey>, F: Into<RedisKey>>(
    self,
    key: K,
    field: F
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns the string length of the value associated with field in the hash stored at key. If the key or the field do not exist, 0 is returned.

https://redis.io/commands/hstrlen

fn hvals<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns all values in the hash stored at key. Returns an empty vector if the list is empty.

https://redis.io/commands/hvals

fn llen<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned. An error is returned when the value stored at key is not a list.

https://redis.io/commands/llen

fn lpush<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. When key holds a value that is not a list, an error is returned.

https://redis.io/commands/lpush

fn lpop<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Option<RedisValue>), Error = RedisError>>
[src]

Removes and returns the first element of the list stored at key.

https://redis.io/commands/lpop

fn sadd<K: Into<RedisKey>, V: Into<MultipleValues>>(
    self,
    key: K,
    values: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Add the specified value to the set stored at key. Values that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified value. An error is returned when the value stored at key is not a set.

https://redis.io/commands/sadd

fn srem<K: Into<RedisKey>, V: Into<MultipleValues>>(
    self,
    key: K,
    values: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Remove the specified value from the set stored at key. Values that are not a member of this set are ignored. If key does not exist, it is treated as an empty set and this command returns 0. An error is returned when the value stored at key is not a set.

https://redis.io/commands/srem

fn smembers<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns all the members of the set value stored at key. This has the same effect as running SINTER with one argument key.

https://redis.io/commands/smembers

fn psubscribe<K: Into<MultipleKeys>>(
    self,
    patterns: K
) -> Box<dyn Future<Item = (Self, Vec<usize>), Error = RedisError>>
[src]

Subscribes the client to the given patterns.

Returns the subscription count for each of the provided patterns.

https://redis.io/commands/psubscribe

fn punsubscribe<K: Into<MultipleKeys>>(
    self,
    patterns: K
) -> Box<dyn Future<Item = (Self, Vec<usize>), Error = RedisError>>
[src]

Unsubscribes the client from the given patterns, or from all of them if none is given.

Returns the subscription count for each of the provided patterns.

https://redis.io/commands/punsubscribe

fn mget<K: Into<MultipleKeys>>(
    self,
    keys: K
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns the values of all specified keys.

https://redis.io/commands/mget

fn zadd<K: Into<RedisKey>, V: Into<MultipleZaddValues>>(
    self,
    key: K,
    options: Option<SetOptions>,
    changed: bool,
    incr: bool,
    values: V
) -> Box<dyn Future<Item = (Self, RedisValue), Error = RedisError>>
[src]

Adds all the specified members with the specified scores to the sorted set stored at key.

https://redis.io/commands/zadd

fn zcard<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns the sorted set cardinality (number of elements) of the sorted set stored at key.

https://redis.io/commands/zcard

fn zcount<K: Into<RedisKey>>(
    self,
    key: K,
    min: f64,
    max: f64
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Returns the number of elements in the sorted set at key with a score between min and max.

https://redis.io/commands/zcount

fn zlexcount<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    self,
    key: K,
    min: M,
    max: N
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zlexcount

fn zincrby<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    incr: f64,
    value: V
) -> Box<dyn Future<Item = (Self, f64), Error = RedisError>>
[src]

Increments the score of member in the sorted set stored at key by increment.

https://redis.io/commands/zincrby

fn zrange<K: Into<RedisKey>>(
    self,
    key: K,
    start: i64,
    stop: i64,
    with_scores: bool
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns the specified range of elements in the sorted set stored at key.

https://redis.io/commands/zrange

fn zrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    self,
    key: K,
    min: M,
    max: N,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.

https://redis.io/commands/zrangebylex

fn zrangebyscore<K: Into<RedisKey>>(
    self,
    key: K,
    min: f64,
    max: f64,
    with_scores: bool,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).

https://redis.io/commands/zrangebyscore

fn zpopmax<K: Into<RedisKey>>(
    self,
    key: K,
    count: Option<usize>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Removes and returns up to count members with the highest scores in the sorted set stored at key.

https://redis.io/commands/zpopmax

fn zpopmin<K: Into<RedisKey>>(
    self,
    key: K,
    count: Option<usize>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Removes and returns up to count members with the lowest scores in the sorted set stored at key.

https://redis.io/commands/zpopmin

fn zrank<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, RedisValue), Error = RedisError>>
[src]

Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.

https://redis.io/commands/zrank

fn zrem<K: Into<RedisKey>, V: Into<MultipleValues>>(
    self,
    key: K,
    values: V
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Removes the specified members from the sorted set stored at key. Non existing members are ignored.

https://redis.io/commands/zrem

fn zremrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    self,
    key: K,
    min: M,
    max: N
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.

https://redis.io/commands/zremrangebylex

fn zremrangebyrank<K: Into<RedisKey>>(
    self,
    key: K,
    start: i64,
    stop: i64
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Removes all elements in the sorted set stored at key with rank between start and stop.

https://redis.io/commands/zremrangebyrank

fn zremrangebyscore<K: Into<RedisKey>>(
    self,
    key: K,
    min: f64,
    max: f64
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Removes all elements in the sorted set stored at key with a score between min and max (inclusive).

https://redis.io/commands/zremrangebyscore

fn zrevrange<K: Into<RedisKey>>(
    self,
    key: K,
    start: i64,
    stop: i64,
    with_scores: bool
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the highest to the lowest score

https://redis.io/commands/zrevrange

fn zrevrangebylex<K: Into<RedisKey>, M: Into<String>, N: Into<String>>(
    self,
    key: K,
    max: M,
    min: N,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.

https://redis.io/commands/zrevrangebylex

fn zrevrangebyscore<K: Into<RedisKey>>(
    self,
    key: K,
    max: f64,
    min: f64,
    with_scores: bool,
    limit: Option<(usize, usize)>
) -> Box<dyn Future<Item = (Self, Vec<RedisValue>), Error = RedisError>>
[src]

Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores.

https://redis.io/commands/zrevrangebyscore

fn zrevrank<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, RedisValue), Error = RedisError>>
[src]

Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.

https://redis.io/commands/zrevrank

fn zscore<K: Into<RedisKey>, V: Into<RedisValue>>(
    self,
    key: K,
    value: V
) -> Box<dyn Future<Item = (Self, RedisValue), Error = RedisError>>
[src]

Returns the score of member in the sorted set at key.

https://redis.io/commands/zscore

fn zinterstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(
    self,
    destination: D,
    keys: K,
    weights: W,
    aggregate: Option<AggregateOptions>
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zinterstore

fn zunionstore<D: Into<RedisKey>, K: Into<MultipleKeys>, W: Into<MultipleWeights>>(
    self,
    destination: D,
    keys: K,
    weights: W,
    aggregate: Option<AggregateOptions>
) -> Box<dyn Future<Item = (Self, usize), Error = RedisError>>
[src]

Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.

https://redis.io/commands/zunionstore

fn ttl<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.

https://redis.io/commands/ttl

fn pttl<K: Into<RedisKey>>(
    self,
    key: K
) -> Box<dyn Future<Item = (Self, i64), Error = RedisError>>
[src]

Like TTL this command returns the remaining time to live of a key that has an expire set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

https://redis.io/commands/pttl

impl Clone for RedisClient[src]

impl<'a> From<&'a Arc<RedisClientInner>> for RedisClient[src]

impl<'a> From<&'a RedisPool> for &'a RedisClient[src]

impl<'a> From<&'a RedisPool> for RedisClient[src]

impl Debug for RedisClient[src]

impl Borrow<RedisClient> for RedisPool[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T