Struct fred::clients::RedisClient
source · [−]pub struct RedisClient { /* private fields */ }
Expand description
The primary Redis client struct.
Implementations
sourceimpl RedisClient
impl RedisClient
sourcepub fn new(config: RedisConfig) -> RedisClient
pub fn new(config: RedisConfig) -> RedisClient
Create a new client instance without connecting to the server.
sourcepub fn clone_new(&self) -> Self
pub fn clone_new(&self) -> Self
Create a new RedisClient
from the config provided to this client.
The returned client will not be connected to the server, and it will use new connections after connecting.
sourcepub fn on_reconnect(&self) -> impl Stream<Item = Self>
pub fn on_reconnect(&self) -> impl Stream<Item = Self>
Listen for reconnection notifications.
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 to the server.
sourcepub fn on_cluster_change(&self) -> impl Stream<Item = Vec<ClusterStateChange>>
pub fn on_cluster_change(&self) -> impl Stream<Item = Vec<ClusterStateChange>>
Listen for notifications whenever the cluster state changes.
This is usually triggered in response to a MOVED
or ASK
error, but can also happen when connections close unexpectedly.
sourcepub async fn split_cluster(&self) -> Result<Vec<RedisClient>, RedisError>
pub async fn split_cluster(&self) -> Result<Vec<RedisClient>, RedisError>
Split a clustered Redis client into a list of centralized clients - one for each primary node in the cluster.
Some Redis commands are not designed to work with hash slots against a clustered deployment. For example,
FLUSHDB
, PING
, etc all work on one node in the cluster, but no interface exists for the client to
select a specific node in the cluster against which to run the command. This function allows the caller to
create a list of clients such that each connect to one of the primary nodes in the cluster and functions
as if it were operating against a single centralized Redis server.
The clients returned by this function will not be connected to their associated servers. The caller needs to
call connect
on each client before sending any commands.
Note: For this to work reliably this function needs to be called each time nodes are added or removed from the cluster.
sourcepub fn scan<P>(
&self,
pattern: P,
count: Option<u32>,
type: Option<ScanType>
) -> impl Stream<Item = Result<ScanResult, RedisError>> where
P: Into<Str>,
pub fn scan<P>(
&self,
pattern: P,
count: Option<u32>,
type: Option<ScanType>
) -> impl Stream<Item = Result<ScanResult, RedisError>> where
P: Into<Str>,
Incrementally iterate over a set of keys matching the pattern
argument, returning count
results per page, if specified.
The scan operation can be canceled by dropping the returned stream.
Note: scanning data in a cluster can be tricky. To make this easier this function supports hash tags in the
pattern
so callers can direct scanning operations to specific nodes in the cluster. Callers can also use split_cluster with this function if
hash tags are not used in the keys that should be scanned.
sourcepub fn scan_cluster<P>(
&self,
pattern: P,
count: Option<u32>,
type: Option<ScanType>
) -> impl Stream<Item = Result<ScanResult, RedisError>> where
P: Into<Str>,
pub fn scan_cluster<P>(
&self,
pattern: P,
count: Option<u32>,
type: Option<ScanType>
) -> impl Stream<Item = Result<ScanResult, RedisError>> where
P: Into<Str>,
Run the SCAN
command on each primary/main node in a cluster concurrently.
In order for this function to work reliably the cluster state must not change while scanning. If nodes are added or removed, or hash slots are rebalanced, it may result in missing keys or duplicate keys in the result stream. If callers need to support cluster scanning while the cluster state may change please see split_cluster.
Unlike SCAN
, HSCAN
, etc, the returned stream may continue even if has_more returns false on a given page of keys.
sourcepub fn hscan<K, P>(
&self,
key: K,
pattern: P,
count: Option<u32>
) -> impl Stream<Item = Result<HScanResult, RedisError>> where
K: Into<RedisKey>,
P: Into<Str>,
pub fn hscan<K, P>(
&self,
key: K,
pattern: P,
count: Option<u32>
) -> impl Stream<Item = Result<HScanResult, RedisError>> where
K: Into<RedisKey>,
P: Into<Str>,
Incrementally iterate over pages of the hash map stored at key
, returning count
results per page, if specified.
sourcepub fn sscan<K, P>(
&self,
key: K,
pattern: P,
count: Option<u32>
) -> impl Stream<Item = Result<SScanResult, RedisError>> where
K: Into<RedisKey>,
P: Into<Str>,
pub fn sscan<K, P>(
&self,
key: K,
pattern: P,
count: Option<u32>
) -> impl Stream<Item = Result<SScanResult, RedisError>> where
K: Into<RedisKey>,
P: Into<Str>,
Incrementally iterate over pages of the set stored at key
, returning count
results per page, if specified.
Trait Implementations
sourceimpl AclInterface for RedisClient
impl AclInterface for RedisClient
sourcefn acl_setuser<S>(&self, username: S, rules: Vec<AclRule>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn acl_setuser<S>(&self, username: S, rules: Vec<AclRule>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Create an ACL user with the specified rules or modify the rules of an existing user. Read more
sourcefn acl_load(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_load(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file. Read more
sourcefn acl_save(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_save(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently defined ACLs from the server memory to the ACL file. Read more
sourcefn acl_list<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn acl_list<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command shows the currently active ACL rules in the Redis server. Read more
sourcefn acl_users<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn acl_users<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more
sourcefn acl_getuser<S>(&self, username: S) -> AsyncResult<Option<AclUser>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn acl_getuser<S>(&self, username: S) -> AsyncResult<Option<AclUser>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns all the rules defined for an existing ACL user. Read more
sourcefn acl_deluser<R, S>(&self, usernames: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<MultipleStrings>,
fn acl_deluser<R, S>(&self, usernames: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<MultipleStrings>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Read more
sourcefn acl_cat(&self, category: Option<Str>) -> AsyncResult<Vec<String>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_cat(&self, category: Option<Str>) -> AsyncResult<Vec<String>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command shows the available ACL categories if called without arguments. If a category name is given, the command shows all the Redis commands in the specified category. Read more
sourcefn acl_genpass(&self, bits: Option<u16>) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_genpass(&self, bits: Option<u16>) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Generate a password with length bits
, returning the password. Read more
sourcefn acl_whoami(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_whoami(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the username the current connection is authenticated with. New connections are authenticated with the “default” user. Read more
sourcefn acl_log_count(&self, count: Option<u32>) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_log_count(&self, count: Option<u32>) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read count
recent ACL security events. Read more
sourcefn acl_log_reset(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn acl_log_reset(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Clear the ACL security events logs. Read more
sourceimpl AuthInterface for RedisClient
impl AuthInterface for RedisClient
sourcefn auth<S>(&self, username: Option<String>, password: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn auth<S>(&self, username: Option<String>, password: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Request for authentication in a password-protected Redis server. Returns ok if successful. Read more
sourcefn hello(
&self,
version: RespVersion,
auth: Option<(String, String)>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn hello(
&self,
version: RespVersion,
auth: Option<(String, String)>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Switch to a different protocol, optionally authenticating in the process. Read more
sourceimpl ClientInterface for RedisClient
impl ClientInterface for RedisClient
sourcefn client_id<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn client_id<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the ID of the current connection. Read more
sourcefn connection_ids(&self) -> AsyncResult<HashMap<Arc<String>, i64>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn connection_ids(&self) -> AsyncResult<HashMap<Arc<String>, i64>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read the connection IDs for the active connections to each server. Read more
sourcefn update_sentinel_nodes(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn update_sentinel_nodes(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Force update the client’s sentinel nodes list if using the sentinel interface. Read more
sourcefn client_info<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn client_info<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns information and statistics about the current client connection in a mostly human readable format. Read more
sourcefn client_kill<R>(&self, filters: Vec<ClientKillFilter>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn client_kill<R>(&self, filters: Vec<ClientKillFilter>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Close a given connection or set of connections. Read more
sourcefn client_list<R, I>(
&self,
type: Option<ClientKillType>,
ids: Option<Vec<String>>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn client_list<R, I>(
&self,
type: Option<ClientKillType>,
ids: Option<Vec<String>>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format. Read more
sourcefn client_getname<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn client_getname<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CLIENT GETNAME returns the name of the current connection as set by CLIENT SETNAME. Read more
sourcefn client_setname<S>(&self, name: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn client_setname<S>(&self, name: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Assign a name to the current connection. Read more
sourcefn client_pause(
&self,
timeout: i64,
mode: Option<ClientPauseKind>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn client_pause(
&self,
timeout: i64,
mode: Option<ClientPauseKind>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLIENT PAUSE is a connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds). Read more
sourcefn client_unpause(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn client_unpause(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLIENT UNPAUSE is used to resume command processing for all clients that were paused by CLIENT PAUSE. Read more
sourcefn client_reply(&self, flag: ClientReplyFlag) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn client_reply(&self, flag: ClientReplyFlag) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CLIENT REPLY command controls whether the server will reply the client’s commands. The following modes are available: Read more
sourcefn client_unblock<R, S>(
&self,
id: S,
flag: Option<ClientUnblockFlag>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisValue>,
fn client_unblock<R, S>(
&self,
id: S,
flag: Option<ClientUnblockFlag>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisValue>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command can unblock, from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT. Read more
sourcefn unblock_self(&self, flag: Option<ClientUnblockFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn unblock_self(&self, flag: Option<ClientUnblockFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A convenience function to unblock any blocked connection on this client.
sourceimpl ClientLike for RedisClient
impl ClientLike for RedisClient
sourcefn id(&self) -> &Arc<String>
fn id(&self) -> &Arc<String>
The unique ID identifying this client and underlying connections. Read more
sourcefn client_config(&self) -> RedisConfig
fn client_config(&self) -> RedisConfig
Read the config used to initialize the client.
sourcefn client_reconnect_policy(&self) -> Option<ReconnectPolicy>
fn client_reconnect_policy(&self) -> Option<ReconnectPolicy>
Read the reconnect policy used to initialize the client.
sourcefn protocol_version(&self) -> RespVersion
fn protocol_version(&self) -> RespVersion
Read the RESP version used by the client when communicating with the server.
sourcefn has_reconnect_policy(&self) -> bool
fn has_reconnect_policy(&self) -> bool
Whether or not the client has a reconnection policy.
sourcefn is_pipelined(&self) -> bool
fn is_pipelined(&self) -> bool
Whether or not the client will automatically pipeline commands.
sourcefn update_perf_config(&self, config: PerformanceConfig)
fn update_perf_config(&self, config: PerformanceConfig)
Update the internal PerformanceConfig in place with new values.
sourcefn state(&self) -> ClientState
fn state(&self) -> ClientState
Read the state of the underlying connection(s). Read more
sourcefn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Whether or not the client has an active connection to the server(s).
sourcefn connect(&self, policy: Option<ReconnectPolicy>) -> ConnectHandle
fn connect(&self, policy: Option<ReconnectPolicy>) -> ConnectHandle
Connect to the Redis server with an optional reconnection policy. Read more
sourcefn wait_for_connect(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn wait_for_connect(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Wait for the client to connect to the server, or return an error if the initial connection cannot be established. If the client is already connected this future will resolve immediately. Read more
sourcefn on_error(&self) -> AsyncStream<RedisError>
fn on_error(&self) -> AsyncStream<RedisError>
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. Read more
sourcefn quit(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn quit(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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 will resolve which indicates that the connection has been fully closed. Read more
sourcefn shutdown(&self, flags: Option<ShutdownFlags>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn shutdown(&self, flags: Option<ShutdownFlags>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Shut down the server and quit the client. Read more
sourcefn ping(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn ping(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Ping the Redis server. Read more
sourcefn info<R>(&self, section: Option<InfoKind>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn info<R>(&self, section: Option<InfoKind>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read info about the server. Read more
sourcefn custom<R, T>(&self, cmd: CustomCommand, args: Vec<T>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: TryInto<RedisValue>,
T::Error: Into<RedisError>,
fn custom<R, T>(&self, cmd: CustomCommand, args: Vec<T>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: TryInto<RedisValue>,
T::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Run a custom command that is not yet supported via another interface on this client. This is most useful when interacting with third party modules or extensions. Read more
sourcefn custom_raw<T>(
&self,
cmd: CustomCommand,
args: Vec<T>
) -> AsyncResult<Resp3Frame>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
T: TryInto<RedisValue>,
T::Error: Into<RedisError>,
fn custom_raw<T>(
&self,
cmd: CustomCommand,
args: Vec<T>
) -> AsyncResult<Resp3Frame>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
T: TryInto<RedisValue>,
T::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
sourceimpl Clone for RedisClient
impl Clone for RedisClient
sourcefn clone(&self) -> RedisClient
fn clone(&self) -> RedisClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ClusterInterface for RedisClient
impl ClusterInterface for RedisClient
sourcefn is_clustered(&self) -> bool
fn is_clustered(&self) -> bool
Whether or not the client is using a clustered Redis deployment.
sourcefn cached_cluster_state(&self) -> Option<ClusterKeyCache>
fn cached_cluster_state(&self) -> Option<ClusterKeyCache>
Read the cached state of the cluster used for routing commands to the correct cluster nodes.
sourcefn cluster_bumpepoch<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn cluster_bumpepoch<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Advances the cluster config epoch. Read more
sourcefn cluster_flushslots(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_flushslots(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Deletes all slots from a node. Read more
sourcefn cluster_myid<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn cluster_myid<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the node’s id. Read more
sourcefn cluster_nodes(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_nodes(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read the current cluster node configuration. Read more
sourcefn cluster_saveconfig(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_saveconfig(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Forces a node to save the nodes.conf configuration on disk. Read more
sourcefn cluster_slots(&self) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_slots(&self) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLUSTER SLOTS returns details about which cluster slots map to which Redis instances. Read more
sourcefn cluster_info(&self) -> AsyncResult<ClusterInfo>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_info(&self) -> AsyncResult<ClusterInfo>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLUSTER INFO provides INFO style information about Redis Cluster vital parameters. Read more
sourcefn cluster_add_slots<S>(&self, slots: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleHashSlots>,
fn cluster_add_slots<S>(&self, slots: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleHashSlots>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is useful in order to modify a node’s view of the cluster configuration. Specifically it assigns a set of hash slots to the node receiving the command. Read more
sourcefn cluster_count_failure_reports<R, S>(&self, node_id: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
fn cluster_count_failure_reports<R, S>(&self, node_id: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns the number of failure reports for the specified node. Read more
sourcefn cluster_count_keys_in_slot<R>(&self, slot: u16) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn cluster_count_keys_in_slot<R>(&self, slot: u16) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the number of keys in the specified Redis Cluster hash slot. Read more
sourcefn cluster_del_slots<S>(&self, slots: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleHashSlots>,
fn cluster_del_slots<S>(&self, slots: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleHashSlots>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CLUSTER DELSLOTS command asks a particular Redis Cluster node to forget which master is serving the hash slots specified as arguments. Read more
sourcefn cluster_failover(&self, flag: Option<ClusterFailoverFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_failover(&self, flag: Option<ClusterFailoverFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command, that can only be sent to a Redis Cluster replica node, forces the replica to start a manual failover of its master instance. Read more
sourcefn cluster_forget<S>(&self, node_id: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn cluster_forget<S>(&self, node_id: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command is used in order to remove a node, specified via its node ID, from the set of known nodes of the Redis Cluster node receiving the command. In other words the specified node is removed from the nodes table of the node receiving the command. Read more
sourcefn cluster_get_keys_in_slot<R>(&self, slot: u16, count: u64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn cluster_get_keys_in_slot<R>(&self, slot: u16, count: u64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns an array of keys names stored in the contacted node and hashing to the specified hash slot. Read more
sourcefn cluster_keyslot<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn cluster_keyslot<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns an integer identifying the hash slot the specified key hashes to. Read more
sourcefn cluster_meet<S>(&self, ip: S, port: u16) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn cluster_meet<S>(&self, ip: S, port: u16) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLUSTER MEET is used in order to connect different Redis nodes with cluster support enabled, into a working cluster. Read more
sourcefn cluster_replicate<S>(&self, node_id: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn cluster_replicate<S>(&self, node_id: S) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command reconfigures a node as a replica of the specified master. If the node receiving the command is an empty master, as a side effect of the command, the node role is changed from master to replica. Read more
sourcefn cluster_replicas<S>(&self, node_id: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn cluster_replicas<S>(&self, node_id: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command provides a list of replica nodes replicating from the specified master node. Read more
sourcefn cluster_reset(&self, mode: Option<ClusterResetFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_reset(&self, mode: Option<ClusterResetFlag>) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Reset a Redis Cluster node, in a more or less drastic way depending on the reset type, that can be hard or soft. Note that this command does not work for masters if they hold one or more keys, in that case to completely reset a master node keys must be removed first, e.g. by using FLUSHALL first, and then CLUSTER RESET. Read more
sourcefn cluster_set_config_epoch(&self, epoch: u64) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_set_config_epoch(&self, epoch: u64) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command sets a specific config epoch in a fresh node. Read more
sourcefn cluster_setslot(
&self,
slot: u16,
state: ClusterSetSlotState
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn cluster_setslot(
&self,
slot: u16,
state: ClusterSetSlotState
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
CLUSTER SETSLOT is responsible of changing the state of a hash slot in the receiving node in different ways. Read more
sourceimpl ConfigInterface for RedisClient
impl ConfigInterface for RedisClient
sourcefn config_resetstat(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn config_resetstat(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Resets the statistics reported by Redis using the INFO command. Read more
sourcefn config_rewrite(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn config_rewrite(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CONFIG REWRITE command rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflect the configuration currently used by the server, which may be different compared to the original one because of the use of the CONFIG SET command. Read more
sourcefn config_get<R, S>(&self, parameter: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
fn config_get<R, S>(&self, parameter: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CONFIG GET command is used to read the configuration parameters of a running Redis server. Read more
sourcefn config_set<P, V>(&self, parameter: P, value: V) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
P: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn config_set<P, V>(&self, parameter: P, value: V) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
P: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The CONFIG SET command is used in order to reconfigure the server at run time without the need to restart Redis. Read more
sourceimpl Display for RedisClient
impl Display for RedisClient
sourceimpl<'a> From<&'a RedisPool> for &'a RedisClient
impl<'a> From<&'a RedisPool> for &'a RedisClient
sourcefn from(p: &'a RedisPool) -> &'a RedisClient
fn from(p: &'a RedisPool) -> &'a RedisClient
Converts to this type from the input type.
sourceimpl<'a> From<&'a RedisPool> for RedisClient
impl<'a> From<&'a RedisPool> for RedisClient
sourcefn from(p: &'a RedisPool) -> RedisClient
fn from(p: &'a RedisPool) -> RedisClient
Converts to this type from the input type.
sourceimpl GeoInterface for RedisClient
impl GeoInterface for RedisClient
sourcefn geoadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
changed: bool,
values: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: Into<MultipleGeoValues>,
fn geoadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
changed: bool,
values: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: Into<MultipleGeoValues>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Adds the specified geospatial items (longitude, latitude, name) to the specified key. Read more
sourcefn geohash<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn geohash<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD). Read more
sourcefn geopos<K, V>(&self, key: K, members: V) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn geopos<K, V>(&self, key: K, members: V) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key. Read more
sourcefn geodist<R, K, S, D>(
&self,
key: K,
src: S,
dest: D,
unit: Option<GeoUnit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
D: TryInto<RedisValue>,
D::Error: Into<RedisError>,
fn geodist<R, K, S, D>(
&self,
key: K,
src: S,
dest: D,
unit: Option<GeoUnit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
D: TryInto<RedisValue>,
D::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the distance between two members in the geospatial index represented by the sorted set. Read more
sourcefn georadius<K, P>(
&self,
key: K,
position: P,
radius: f64,
unit: GeoUnit,
withcoord: bool,
withdist: bool,
withhash: bool,
count: Option<(u64, Any)>,
ord: Option<SortOrder>,
store: Option<RedisKey>,
storedist: Option<RedisKey>
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
P: Into<GeoPosition>,
fn georadius<K, P>(
&self,
key: K,
position: P,
radius: f64,
unit: GeoUnit,
withcoord: bool,
withdist: bool,
withhash: bool,
count: Option<(u64, Any)>,
ord: Option<SortOrder>,
store: Option<RedisKey>,
storedist: Option<RedisKey>
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
P: Into<GeoPosition>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). Read more
sourcefn georadiusbymember<K, V>(
&self,
key: K,
member: V,
radius: f64,
unit: GeoUnit,
withcoord: bool,
withdist: bool,
withhash: bool,
count: Option<(u64, Any)>,
ord: Option<SortOrder>,
store: Option<RedisKey>,
storedist: Option<RedisKey>
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn georadiusbymember<K, V>(
&self,
key: K,
member: V,
radius: f64,
unit: GeoUnit,
withcoord: bool,
withdist: bool,
withhash: bool,
count: Option<(u64, Any)>,
ord: Option<SortOrder>,
store: Option<RedisKey>,
storedist: Option<RedisKey>
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set. Read more
sourcefn geosearch<K>(
&self,
key: K,
from_member: Option<RedisValue>,
from_lonlat: Option<GeoPosition>,
by_radius: Option<(f64, GeoUnit)>,
by_box: Option<(f64, f64, GeoUnit)>,
ord: Option<SortOrder>,
count: Option<(u64, Any)>,
withcoord: bool,
withdist: bool,
withhash: bool
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
fn geosearch<K>(
&self,
key: K,
from_member: Option<RedisValue>,
from_lonlat: Option<GeoPosition>,
by_radius: Option<(f64, GeoUnit)>,
by_box: Option<(f64, f64, GeoUnit)>,
ord: Option<SortOrder>,
count: Option<(u64, Any)>,
withcoord: bool,
withdist: bool,
withhash: bool
) -> AsyncResult<Vec<GeoRadiusInfo>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. Read more
sourcefn geosearchstore<R, D, S>(
&self,
dest: D,
source: S,
from_member: Option<RedisValue>,
from_lonlat: Option<GeoPosition>,
by_radius: Option<(f64, GeoUnit)>,
by_box: Option<(f64, f64, GeoUnit)>,
ord: Option<SortOrder>,
count: Option<(u64, Any)>,
storedist: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<RedisKey>,
fn geosearchstore<R, D, S>(
&self,
dest: D,
source: S,
from_member: Option<RedisValue>,
from_lonlat: Option<GeoPosition>,
by_radius: Option<(f64, GeoUnit)>,
by_box: Option<(f64, f64, GeoUnit)>,
ord: Option<SortOrder>,
count: Option<(u64, Any)>,
storedist: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is like GEOSEARCH, but stores the result in destination key. Returns the number of members added to the destination key. Read more
sourceimpl HashesInterface for RedisClient
impl HashesInterface for RedisClient
sourcefn hgetall<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn hgetall<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns all fields and values of the hash stored at key
. Read more
sourcefn hdel<R, K, F>(&self, key: K, fields: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<MultipleKeys>,
fn hdel<R, K, F>(&self, key: K, fields: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes the specified fields from the hash stored at key
. Read more
sourcefn hexists<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
fn hexists<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns if field
is an existing field in the hash stored at key
. Read more
sourcefn hget<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
fn hget<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the value associated with field
in the hash stored at key
. Read more
sourcefn hincrby<R, K, F>(&self, key: K, field: F, increment: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
fn hincrby<R, K, F>(&self, key: K, field: F, increment: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increments the number stored at field
in the hash stored at key
by increment
. Read more
sourcefn hincrbyfloat<R, K, F>(
&self,
key: K,
field: F,
increment: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
fn hincrbyfloat<R, K, F>(
&self,
key: K,
field: F,
increment: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increment the specified field
of a hash stored at key
, and representing a floating point number, by the specified increment
. Read more
sourcefn hkeys<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn hkeys<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns all field names in the hash stored at key
. Read more
sourcefn hlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn hlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the number of fields contained in the hash stored at key
. Read more
sourcefn hmget<R, K, F>(&self, key: K, fields: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<MultipleKeys>,
fn hmget<R, K, F>(&self, key: K, fields: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the values associated with the specified fields
in the hash stored at key
. Read more
sourcefn hmset<R, K, V>(&self, key: K, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
fn hmset<R, K, V>(&self, key: K, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets the specified fields to their respective values in the hash stored at key
. Read more
sourcefn hset<R, K, V>(&self, key: K, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
fn hset<R, K, V>(&self, key: K, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets fields in the hash stored at key
to their provided values. Read more
sourcefn hsetnx<R, K, F, V>(&self, key: K, field: F, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn hsetnx<R, K, F, V>(&self, key: K, field: F, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets field
in the hash stored at key
to value
, only if field
does not yet exist. Read more
sourcefn hrandfield<R, K>(&self, key: K, count: Option<(i64, bool)>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn hrandfield<R, K>(&self, key: K, count: Option<(i64, bool)>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When called with just the key
argument, return a random field from the hash value stored at key
. Read more
sourcefn hstrlen<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
fn hstrlen<R, K, F>(&self, key: K, field: F) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
F: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the string length of the value associated with field
in the hash stored at key
. Read more
sourcefn hvals<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn hvals<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns all values in the hash stored at key
. Read more
sourceimpl HeartbeatInterface for RedisClient
impl HeartbeatInterface for RedisClient
sourcefn enable_heartbeat(
&self,
interval: Duration,
break_on_error: bool
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn enable_heartbeat(
&self,
interval: Duration,
break_on_error: bool
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return a future that will ping the server on an interval. Read more
sourceimpl HyperloglogInterface for RedisClient
impl HyperloglogInterface for RedisClient
sourcefn pfadd<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn pfadd<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument. Read more
sourcefn pfcount<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn pfcount<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist. Read more
sourcefn pfmerge<R, D, S>(&self, dest: D, sources: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<MultipleKeys>,
fn pfmerge<R, D, S>(&self, dest: D, sources: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed sets of the source HyperLogLog structures. Read more
sourceimpl KeysInterface for RedisClient
impl KeysInterface for RedisClient
sourcefn randomkey<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn randomkey<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return a random key from the currently selected database. Read more
sourcefn copy<R, S, D>(
&self,
source: S,
destination: D,
db: Option<u8>,
replace: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
fn copy<R, S, D>(
&self,
source: S,
destination: D,
db: Option<u8>,
replace: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command copies the value stored at the source key to the destination key. Read more
sourcefn dump<K>(&self, key: K) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
fn dump<K>(&self, key: K) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Serialize the value stored at key
in a Redis-specific format and return it as bulk string. Read more
sourcefn restore<K>(
&self,
key: K,
ttl: i64,
serialized: RedisValue,
replace: bool,
absttl: bool,
idletime: Option<i64>,
frequency: Option<i64>
) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
fn restore<K>(
&self,
key: K,
ttl: i64,
serialized: RedisValue,
replace: bool,
absttl: bool,
idletime: Option<i64>,
frequency: Option<i64>
) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Create a key associated with a value that is obtained by deserializing the provided serialized value Read more
sourcefn set<R, K, V>(
&self,
key: K,
value: V,
expire: Option<Expiration>,
options: Option<SetOptions>,
get: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn set<R, K, V>(
&self,
key: K,
value: V,
expire: Option<Expiration>,
options: Option<SetOptions>,
get: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Set a value with optional NX|XX, EX|PX|EXAT|PXAT|KEEPTTL, and GET arguments. Read more
sourcefn get<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn get<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read a value from the server. Read more
sourcefn getrange<R, K>(&self, key: K, start: usize, end: usize) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn getrange<R, K>(&self, key: K, start: usize, end: usize) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the substring of the string value stored at key
with offsets start
and end
(both inclusive). Read more
sourcefn setrange<R, K, V>(&self, key: K, offset: u32, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn setrange<R, K, V>(&self, key: K, offset: u32, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Overwrites part of the string stored at key
, starting at the specified offset
, for the entire length of value
. Read more
sourcefn getset<R, K, V>(&self, key: K, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn getset<R, K, V>(&self, key: K, value: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Atomically sets key
to value
and returns the old value stored at key
. Read more
sourcefn getdel<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn getdel<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key’s value type is a string). Read more
sourcefn strlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn strlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the length of the string value stored at key. An error is returned when key holds a non-string value. Read more
sourcefn del<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn del<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes the specified keys. A key is ignored if it does not exist. Read more
sourcefn mget<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn mget<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned. Read more
sourcefn mset<V>(&self, values: V) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
fn mset<V>(&self, values: V) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets the given keys to their respective values. Read more
sourcefn msetnx<R, V>(&self, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
fn msetnx<R, V>(&self, values: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
V: TryInto<RedisMap>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets the given keys to their respective values. MSETNX will not perform any operation at all even if just a single key already exists. Read more
sourcefn incr<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn incr<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increments the number stored at key
by one. If the key does not exist, it is set to 0 before performing the operation. Read more
sourcefn incr_by<R, K>(&self, key: K, val: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn incr_by<R, K>(&self, key: K, val: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increments the number stored at key
by val
. If the key does not exist, it is set to 0 before performing the operation. Read more
sourcefn incr_by_float<R, K>(&self, key: K, val: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn incr_by_float<R, K>(&self, key: K, val: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increment the string representing a floating point number stored at key by val
. If the key does not exist, it is set to 0 before performing the operation. Read more
sourcefn decr<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn decr<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Decrements the number stored at key
by one. If the key does not exist, it is set to 0 before performing the operation. Read more
sourcefn decr_by<R, K>(&self, key: K, val: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn decr_by<R, K>(&self, key: K, val: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Decrements the number stored at key
by val
. If the key does not exist, it is set to 0 before performing the operation. Read more
sourcefn ttl<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn ttl<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the remaining time to live of a key that has a timeout, in seconds. Read more
sourcefn pttl<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn pttl<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the remaining time to live of a key that has a timeout, in milliseconds. Read more
sourcefn persist<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn persist<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Remove the existing timeout on a key, turning the key from volatile (a key with an expiration) to persistent (a key that will never expire as no timeout is associated). Read more
sourcefn expire<R, K>(&self, key: K, seconds: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn expire<R, K>(&self, key: K, seconds: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Set a timeout on key. After the timeout has expired, the key will be automatically deleted. Read more
sourcefn expire_at<R, K>(&self, key: K, timestamp: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn expire_at<R, K>(&self, key: K, timestamp: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Set a timeout on a key based on a UNIX timestamp. Read more
sourcefn exists<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn exists<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns number of keys that exist from the keys
arguments. Read more
sourceimpl ListInterface for RedisClient
impl ListInterface for RedisClient
sourcefn blpop<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn blpop<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
BLPOP is a blocking list pop primitive. It is the blocking version of LPOP because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given. Read more
sourcefn brpop<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn brpop<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
BRPOP is a blocking list pop primitive. It is the blocking version of RPOP because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given. Read more
sourcefn brpoplpush<R, S, D>(
&self,
source: S,
destination: D,
timeout: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
fn brpoplpush<R, S, D>(
&self,
source: S,
destination: D,
timeout: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The blocking equivalent of Self::rpoplpush. Read more
sourcefn blmove<R, S, D>(
&self,
source: S,
destination: D,
source_direction: LMoveDirection,
destination_direction: LMoveDirection,
timeout: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
fn blmove<R, S, D>(
&self,
source: S,
destination: D,
source_direction: LMoveDirection,
destination_direction: LMoveDirection,
timeout: f64
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The blocking equivalent of Self::lmove. Read more
sourcefn lindex<R, K>(&self, key: K, index: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn lindex<R, K>(&self, key: K, index: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the element at index index in the list stored at key. Read more
sourcefn linsert<R, K, P, V>(
&self,
key: K,
location: ListLocation,
pivot: P,
element: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
P: TryInto<RedisValue>,
P::Error: Into<RedisError>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn linsert<R, K, P, V>(
&self,
key: K,
location: ListLocation,
pivot: P,
element: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
P: TryInto<RedisValue>,
P::Error: Into<RedisError>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Inserts element in the list stored at key either before or after the reference value pivot
. Read more
sourcefn llen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn llen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the length of the list stored at key. Read more
sourcefn lpop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn lpop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes and returns the first elements of the list stored at key. Read more
sourcefn lpos<R, K, V>(
&self,
key: K,
element: V,
rank: Option<i64>,
count: Option<i64>,
maxlen: Option<i64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn lpos<R, K, V>(
&self,
key: K,
element: V,
rank: Option<i64>,
count: Option<i64>,
maxlen: Option<i64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns the index of matching elements inside a Redis list. Read more
sourcefn lpush<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn lpush<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Insert all the specified values at the head of the list stored at key
. Read more
sourcefn lpushx<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn lpushx<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Inserts specified values at the head of the list stored at key
, only if key
already exists and holds a list. Read more
sourcefn lrange<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn lrange<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the specified elements of the list stored at key
. Read more
sourcefn lrem<R, K, V>(&self, key: K, count: i64, element: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn lrem<R, K, V>(&self, key: K, count: i64, element: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes the first count
occurrences of elements equal to element
from the list stored at key
. Read more
sourcefn lset<R, K, V>(&self, key: K, index: i64, element: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn lset<R, K, V>(&self, key: K, index: i64, element: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Sets the list element at index
to element
. Read more
sourcefn ltrim<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn ltrim<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Trim an existing list so that it will contain only the specified range of elements specified. Read more
sourcefn rpop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn rpop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes and returns the last elements of the list stored at key
. Read more
sourcefn rpoplpush<R, S, D>(&self, source: S, dest: D) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
fn rpoplpush<R, S, D>(&self, source: S, dest: D) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Atomically returns and removes the last element (tail) of the list stored at source
, and pushes the element at the first element (head) of the list stored at destination
. Read more
sourcefn lmove<R, S, D>(
&self,
source: S,
dest: D,
source_direction: LMoveDirection,
dest_direction: LMoveDirection
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
fn lmove<R, S, D>(
&self,
source: S,
dest: D,
source_direction: LMoveDirection,
dest_direction: LMoveDirection
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Atomically returns and removes the first/last element (head/tail depending on the source direction argument) of the list stored at source
, and pushes
the element at the first/last element (head/tail depending on the destination direction argument) of the list stored at destination
. Read more
sourcefn rpush<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn rpush<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Insert all the specified values at the tail of the list stored at key
. Read more
sourcefn rpushx<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn rpushx<R, K, V>(&self, key: K, elements: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Inserts specified values at the tail of the list stored at key
, only if key already exists and holds a list. Read more
sourceimpl LuaInterface for RedisClient
impl LuaInterface for RedisClient
sourcefn script_load<S>(&self, script: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn script_load<S>(&self, script: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Load a script into the scripts cache, without executing it. After the specified command is loaded into the script cache it will be callable using EVALSHA with the correct SHA1 digest of the script. Read more
sourcefn script_load_cluster<S>(&self, script: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn script_load_cluster<S>(&self, script: S) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A clustered variant of script_load that loads the script on all primary nodes in a cluster.
sourcefn script_kill(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn script_kill(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Kills the currently executing Lua script, assuming no write operation was yet performed by the script. Read more
sourcefn script_kill_cluster(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn script_kill_cluster(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A clustered variant of the script_kill command that issues the command to all primary nodes in the cluster.
sourcefn script_flush(&self, async: bool) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn script_flush(&self, async: bool) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Flush the Lua scripts cache. Read more
sourcefn script_flush_cluster(&self, async: bool) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn script_flush_cluster(&self, async: bool) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A clustered variant of script_flush that flushes the script cache on all primary nodes in the cluster.
sourcefn script_exists<H>(&self, hashes: H) -> AsyncResult<Vec<bool>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
H: Into<MultipleStrings>,
fn script_exists<H>(&self, hashes: H) -> AsyncResult<Vec<bool>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
H: Into<MultipleStrings>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns information about the existence of the scripts in the script cache. Read more
sourcefn script_debug(&self, flag: ScriptDebugFlag) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn script_debug(&self, flag: ScriptDebugFlag) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Set the debug mode for subsequent scripts executed with EVAL. Read more
sourcefn evalsha<R, S, K, V>(&self, hash: S, keys: K, args: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
K: Into<MultipleKeys>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn evalsha<R, S, K, V>(&self, hash: S, keys: K, args: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
K: Into<MultipleKeys>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Evaluates a script cached on the server side by its SHA1 digest. Read more
sourcefn eval<R, S, K, V>(&self, script: S, keys: K, args: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
K: Into<MultipleKeys>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn eval<R, S, K, V>(&self, script: S, keys: K, args: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
K: Into<MultipleKeys>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Evaluate a Lua script on the server. Read more
sourceimpl MemoryInterface for RedisClient
impl MemoryInterface for RedisClient
sourcefn memory_doctor(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn memory_doctor(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The MEMORY DOCTOR command reports about different memory-related issues that the Redis server experiences, and advises about possible remedies. Read more
sourcefn memory_malloc_stats(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn memory_malloc_stats(&self) -> AsyncResult<String>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The MEMORY MALLOC-STATS command provides an internal statistics report from the memory allocator. Read more
sourcefn memory_purge(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn memory_purge(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The MEMORY PURGE command attempts to purge dirty pages so these can be reclaimed by the allocator. Read more
sourcefn memory_stats(&self) -> AsyncResult<MemoryStats>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn memory_stats(&self) -> AsyncResult<MemoryStats>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The MEMORY STATS command returns an Array reply about the memory usage of the server. Read more
sourcefn memory_usage<K>(
&self,
key: K,
samples: Option<u32>
) -> AsyncResult<Option<u64>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
fn memory_usage<K>(
&self,
key: K,
samples: Option<u32>
) -> AsyncResult<Option<u64>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The MEMORY USAGE command reports the number of bytes that a key and its value require to be stored in RAM. Read more
sourceimpl MetricsInterface for RedisClient
impl MetricsInterface for RedisClient
sourcefn read_redelivery_count(&self) -> usize
fn read_redelivery_count(&self) -> usize
Read the number of request redeliveries. Read more
sourcefn take_redelivery_count(&self) -> usize
fn take_redelivery_count(&self) -> usize
Read and reset the number of request redeliveries.
sourcefn command_queue_len(&self) -> usize
fn command_queue_len(&self) -> usize
Read the number of buffered commands that have not yet been sent to the server.
sourcefn read_latency_metrics(&self) -> Stats
fn read_latency_metrics(&self) -> Stats
metrics
only.Read latency metrics across all commands. Read more
sourcefn take_latency_metrics(&self) -> Stats
fn take_latency_metrics(&self) -> Stats
metrics
only.Read and consume latency metrics, resetting their values afterwards.
sourcefn read_network_latency_metrics(&self) -> Stats
fn read_network_latency_metrics(&self) -> Stats
metrics
only.Read network latency metrics across all commands. Read more
sourcefn take_network_latency_metrics(&self) -> Stats
fn take_network_latency_metrics(&self) -> Stats
metrics
only.Read and consume network latency metrics, resetting their values afterwards.
sourcefn read_req_size_metrics(&self) -> Stats
fn read_req_size_metrics(&self) -> Stats
metrics
only.Read request payload size metrics across all commands.
sourcefn take_req_size_metrics(&self) -> Stats
fn take_req_size_metrics(&self) -> Stats
metrics
only.Read and consume request payload size metrics, resetting their values afterwards.
sourcefn read_res_size_metrics(&self) -> Stats
fn read_res_size_metrics(&self) -> Stats
metrics
only.Read response payload size metrics across all commands.
sourcefn take_res_size_metrics(&self) -> Stats
fn take_res_size_metrics(&self) -> Stats
metrics
only.Read and consume response payload size metrics, resetting their values afterwards.
sourceimpl PubsubInterface for RedisClient
impl PubsubInterface for RedisClient
sourcefn on_message(&self) -> AsyncStream<(String, RedisValue)>
fn on_message(&self) -> AsyncStream<(String, RedisValue)>
Listen for (channel, message)
tuples on the publish-subscribe interface. Keyspace events are not sent on this interface. Read more
sourcefn on_keyspace_event(&self) -> AsyncStream<KeyspaceEvent>
fn on_keyspace_event(&self) -> AsyncStream<KeyspaceEvent>
Listen for keyspace and keyevent notifications on the publish subscribe interface. Read more
sourcefn subscribe<S>(&self, channel: S) -> AsyncResult<usize>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn subscribe<S>(&self, channel: S) -> AsyncResult<usize>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Subscribe to a channel on the PubSub interface, returning the number of channels to which the client is subscribed. Read more
sourcefn unsubscribe<S>(&self, channel: S) -> AsyncResult<usize>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
fn unsubscribe<S>(&self, channel: S) -> AsyncResult<usize>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Unsubscribe from a channel on the PubSub interface, returning the number of channels to which hte client is subscribed. Read more
sourcefn psubscribe<S>(&self, patterns: S) -> AsyncResult<Vec<usize>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleStrings>,
fn psubscribe<S>(&self, patterns: S) -> AsyncResult<Vec<usize>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleStrings>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Subscribes the client to the given patterns. Read more
sourcefn punsubscribe<S>(&self, patterns: S) -> AsyncResult<Vec<usize>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleStrings>,
fn punsubscribe<S>(&self, patterns: S) -> AsyncResult<Vec<usize>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
S: Into<MultipleStrings>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Unsubscribes the client from the given patterns, or from all of them if none is given. Read more
sourcefn publish<R, S, V>(&self, channel: S, message: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn publish<R, S, V>(&self, channel: S, message: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Publish a message on the PubSub interface, returning the number of clients that received the message. Read more
sourceimpl ServerInterface for RedisClient
impl ServerInterface for RedisClient
sourcefn bgrewriteaof<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn bgrewriteaof<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Instruct Redis to start an Append Only File rewrite process. Read more
sourcefn bgsave<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn bgsave<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Save the DB in background. Read more
sourcefn dbsize<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn dbsize<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the number of keys in the selected database. Read more
sourcefn flushall<R>(&self, async: bool) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn flushall<R>(&self, async: bool) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Delete the keys in all databases. Read more
sourcefn flushall_cluster(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn flushall_cluster(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Delete the keys on all nodes in the cluster. This is a special function that does not map directly to the Redis interface.
sourcefn select(&self, db: u8) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn select(&self, db: u8) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Select the database this client should use. Read more
sourcefn failover(
&self,
to: Option<(String, u16)>,
force: bool,
abort: bool,
timeout: Option<u32>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn failover(
&self,
to: Option<(String, u16)>,
force: bool,
abort: bool,
timeout: Option<u32>
) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command will start a coordinated failover between the currently-connected-to master and one of its replicas. Read more
sourcefn lastsave<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
fn lastsave<R>(&self) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the UNIX TIME of the last DB save executed with success. Read more
sourceimpl SetsInterface for RedisClient
impl SetsInterface for RedisClient
sourcefn sadd<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn sadd<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Add the specified members to the set stored at key
. Read more
sourcefn scard<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn scard<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the set cardinality (number of elements) of the set stored at key
. Read more
sourcefn sdiff<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn sdiff<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the members of the set resulting from the difference between the first set and all the successive sets. Read more
sourcefn sdiffstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
fn sdiffstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination
. Read more
sourcefn sinter<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn sinter<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the members of the set resulting from the intersection of all the given sets. Read more
sourcefn sinterstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
fn sinterstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination
. Read more
sourcefn sismember<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn sismember<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns if member
is a member of the set stored at key
. Read more
sourcefn smismember<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn smismember<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns whether each member is a member of the set stored at key
. Read more
sourcefn smembers<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn smembers<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns all the members of the set value stored at key
. Read more
sourcefn smove<R, S, D, V>(&self, source: S, dest: D, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn smove<R, S, D, V>(&self, source: S, dest: D, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
S: Into<RedisKey>,
D: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Move member
from the set at source
to the set at destination
. Read more
sourcefn spop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn spop<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes and returns one or more random members from the set value store at key
. Read more
sourcefn srandmember<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn srandmember<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When called with just the key argument, return a random element from the set value stored at key
. Read more
sourcefn srem<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn srem<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Remove the specified members from the set stored at key
. Read more
sourcefn sunion<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn sunion<R, K>(&self, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the members of the set resulting from the union of all the given sets. Read more
sourcefn sunionstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
fn sunionstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination
. Read more
sourceimpl SlowlogInterface for RedisClient
impl SlowlogInterface for RedisClient
sourcefn slowlog_get(&self, count: Option<i64>) -> AsyncResult<Vec<SlowlogEntry>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn slowlog_get(&self, count: Option<i64>) -> AsyncResult<Vec<SlowlogEntry>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is used to read the slow queries log. Read more
sourcefn slowlog_length(&self) -> AsyncResult<u64>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn slowlog_length(&self) -> AsyncResult<u64>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is used to read length of the slow queries log. Read more
sourcefn slowlog_reset(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn slowlog_reset(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is used to reset the slow queries log. Read more
sourceimpl SortedSetsInterface for RedisClient
impl SortedSetsInterface for RedisClient
sourcefn bzpopmin<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn bzpopmin<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The blocking variant of the ZPOPMIN command. Read more
sourcefn bzpopmax<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn bzpopmax<R, K>(&self, keys: K, timeout: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The blocking variant of the ZPOPMAX command. Read more
sourcefn zadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
ordering: Option<Ordering>,
changed: bool,
incr: bool,
values: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleZaddValues>,
V::Error: Into<RedisError>,
fn zadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
ordering: Option<Ordering>,
changed: bool,
incr: bool,
values: V
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleZaddValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Adds all the specified members with the specified scores to the sorted set stored at key
. Read more
sourcefn zcard<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zcard<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the sorted set cardinality (number of elements) of the sorted set stored at key
. Read more
sourcefn zcount<R, K>(&self, key: K, min: f64, max: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zcount<R, K>(&self, key: K, min: f64, max: f64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the number of elements in the sorted set at key
with a score between min
and max
. Read more
sourcefn zdiff<R, K>(&self, keys: K, withscores: bool) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
fn zdiff<R, K>(&self, keys: K, withscores: bool) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is similar to ZDIFFSTORE, but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zdiffstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
fn zdiffstore<R, D, K>(&self, dest: D, keys: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Computes the difference between the first and all successive input sorted sets and stores the result in destination
. Read more
sourcefn zincrby<R, K, V>(&self, key: K, increment: f64, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn zincrby<R, K, V>(&self, key: K, increment: f64, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Increments the score of member
in the sorted set stored at key
by increment
. Read more
sourcefn zinter<R, K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
fn zinter<R, K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is similar to ZINTERSTORE, but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zinterstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
fn zinterstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Computes the intersection of the sorted sets given by the specified keys, and stores the result in destination
. Read more
sourcefn zlexcount<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zlexcount<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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. Read more
sourcefn zpopmax<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zpopmax<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes and returns up to count members with the highest scores in the sorted set stored at key
. Read more
sourcefn zpopmin<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zpopmin<R, K>(&self, key: K, count: Option<usize>) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes and returns up to count members with the lowest scores in the sorted set stored at key
. Read more
sourcefn zrandmember<R, K>(
&self,
key: K,
count: Option<(i64, bool)>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zrandmember<R, K>(
&self,
key: K,
count: Option<(i64, bool)>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
When called with just the key argument, return a random element from the sorted set value stored at key
. Read more
sourcefn zrangestore<R, D, S, M, N>(
&self,
dest: D,
source: S,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrangestore<R, D, S, M, N>(
&self,
dest: D,
source: S,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
S: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is like ZRANGE, but stores the result in the destination
key. Read more
sourcefn zrange<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrange<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the specified range of elements in the sorted set stored at key
. Read more
sourcefn zrangebylex<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrangebylex<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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
. Read more
sourcefn zrevrangebylex<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrevrangebylex<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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
. Read more
sourcefn zrangebyscore<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
withscores: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrangebyscore<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
withscores: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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
). Read more
sourcefn zrevrangebyscore<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
withscores: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zrevrangebyscore<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
withscores: bool,
limit: Option<Limit>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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
). Read more
sourcefn zrank<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn zrank<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the rank of member in the sorted set stored at key
, with the scores ordered from low to high. Read more
sourcefn zrem<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn zrem<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes the specified members from the sorted set stored at key
. Non existing members are ignored. Read more
sourcefn zremrangebylex<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zremrangebylex<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
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
. Read more
sourcefn zremrangebyrank<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zremrangebyrank<R, K>(&self, key: K, start: i64, stop: i64) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes all elements in the sorted set stored at key
with rank between start
and stop
. Read more
sourcefn zremrangebyscore<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
fn zremrangebyscore<R, K, M, N>(&self, key: K, min: M, max: N) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
M: TryInto<ZRange>,
M::Error: Into<RedisError>,
N: TryInto<ZRange>,
N::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes all elements in the sorted set stored at key
with a score between min
and max
. Read more
sourcefn zrevrange<R, K>(
&self,
key: K,
start: i64,
stop: i64,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn zrevrange<R, K>(
&self,
key: K,
start: i64,
stop: i64,
withscores: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the specified range of elements in the sorted set stored at key
. Read more
sourcefn zrevrank<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn zrevrank<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the rank of member
in the sorted set stored at key
, with the scores ordered from high to low. Read more
sourcefn zscore<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn zscore<R, K, V>(&self, key: K, member: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the score of member
in the sorted set at key
. Read more
sourcefn zunion<K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool
) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
fn zunion<K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool
) -> AsyncResult<RedisValue>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command is similar to ZUNIONSTORE, but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zunionstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
fn zunionstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
D: Into<RedisKey>,
K: Into<MultipleKeys>,
W: Into<MultipleWeights>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Computes the union of the sorted sets given by the specified keys, and stores the result in destination
. Read more
sourcefn zmscore<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
fn zmscore<R, K, V>(&self, key: K, members: V) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
V: TryInto<MultipleValues>,
V::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the scores associated with the specified members in the sorted set stored at key
. Read more
sourceimpl StreamsInterface for RedisClient
impl StreamsInterface for RedisClient
sourcefn xinfo_consumers<R, K, S>(&self, key: K, groupname: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
fn xinfo_consumers<R, K, S>(&self, key: K, groupname: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command returns the list of consumers that belong to the groupname
consumer group of the stream stored at key
. Read more
sourcefn xinfo_groups<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn xinfo_groups<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command returns the list of all consumers groups of the stream stored at key
. Read more
sourcefn xinfo_stream<R, K>(
&self,
key: K,
full: bool,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn xinfo_stream<R, K>(
&self,
key: K,
full: bool,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command returns information about the stream stored at key
. Read more
sourcefn xadd<R, K, C, I, F>(
&self,
key: K,
nomkstream: bool,
cap: C,
id: I,
fields: F
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
I: Into<XID>,
F: TryInto<MultipleOrderedPairs>,
F::Error: Into<RedisError>,
C: TryInto<XCap>,
C::Error: Into<RedisError>,
fn xadd<R, K, C, I, F>(
&self,
key: K,
nomkstream: bool,
cap: C,
id: I,
fields: F
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
I: Into<XID>,
F: TryInto<MultipleOrderedPairs>,
F::Error: Into<RedisError>,
C: TryInto<XCap>,
C::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Appends the specified stream entry to the stream at the specified key. If the key does not exist, as a side effect of running this command the key is created with a stream value. The creation of stream’s key can be disabled with the NOMKSTREAM option. Read more
sourcefn xtrim<R, K, C>(&self, key: K, cap: C) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
C: TryInto<XCap>,
C::Error: Into<RedisError>,
fn xtrim<R, K, C>(&self, key: K, cap: C) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
C: TryInto<XCap>,
C::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Trims the stream by evicting older entries (entries with lower IDs) if needed. Read more
sourcefn xdel<R, K, S>(&self, key: K, ids: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<MultipleStrings>,
fn xdel<R, K, S>(&self, key: K, ids: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<MultipleStrings>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Removes the specified entries from a stream, and returns the number of entries deleted. Read more
sourcefn xrange_values<Ri, Rk, Rv, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
fn xrange_values<Ri, Rk, Rv, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Return the stream entries matching the provided range of IDs, automatically converting to a less verbose type definition. Read more
sourcefn xrange<R, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
fn xrange<R, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
The command returns the stream entries matching a given range of IDs. The range is specified by a minimum and maximum ID. All the entries having an ID between the two specified or exactly one of the two IDs specified (closed interval) are returned. Read more
sourcefn xrevrange_values<Ri, Rk, Rv, K, E, S>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
fn xrevrange_values<Ri, Rk, Rv, K, E, S>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Similar to XRANGE
, but with the results returned in reverse order. The results will be automatically converted to a less verbose type definition. Read more
sourcefn xrevrange<R, K, S, E>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
fn xrevrange<R, K, S, E>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: TryInto<RedisValue>,
S::Error: Into<RedisError>,
E: TryInto<RedisValue>,
E::Error: Into<RedisError>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Similar to XRANGE
, but with the results returned in reverse order. Read more
sourcefn xlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
fn xlen<R, K>(&self, key: K) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Returns the number of entries inside a stream. Read more
sourcefn xread_map<Rk1, Rk2, Rk3, Rv, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I
) -> AsyncResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Rk1: FromRedisKey + Hash + Eq + Unpin + Send,
Rk2: FromRedis + Unpin + Send,
Rk3: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
fn xread_map<Rk1, Rk2, Rk3, Rv, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I
) -> AsyncResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Rk1: FromRedisKey + Hash + Eq + Unpin + Send,
Rk2: FromRedis + Unpin + Send,
Rk3: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read data from one or multiple streams, only returning entries with an ID greater than the last received ID reported by the caller. Read more
sourcefn xread<R, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
fn xread<R, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Read data from one or multiple streams, only returning entries with an ID greater than the last received ID reported by the caller. Read more
sourcefn xgroup_create<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I,
mkstream: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
I: Into<XID>,
fn xgroup_create<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I,
mkstream: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
I: Into<XID>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command creates a new consumer group uniquely identified by groupname
for the stream stored at key
. Read more
sourcefn xgroup_createconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
fn xgroup_createconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Create a consumer named consumername
in the consumer group groupname
of the stream that’s stored at key
. Read more
sourcefn xgroup_delconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
fn xgroup_delconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Delete a consumer named consumername
in the consumer group groupname
of the stream that’s stored at key
. Read more
sourcefn xgroup_destroy<R, K, S>(&self, key: K, groupname: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
fn xgroup_destroy<R, K, S>(&self, key: K, groupname: S) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Completely destroy a consumer group. Read more
sourcefn xgroup_setid<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
I: Into<XID>,
fn xgroup_setid<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
S: Into<Str>,
I: Into<XID>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Set the last delivered ID for a consumer group. Read more
sourcefn xreadgroup_map<Rk1, Rk2, Rk3, Rv, G, C, K, I>(
&self,
group: G,
consumer: C,
count: Option<u64>,
block: Option<u64>,
noack: bool,
keys: K,
ids: I
) -> AsyncResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Rk1: FromRedisKey + Hash + Eq + Unpin + Send,
Rk2: FromRedis + Unpin + Send,
Rk3: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
G: Into<Str>,
C: Into<Str>,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
fn xreadgroup_map<Rk1, Rk2, Rk3, Rv, G, C, K, I>(
&self,
group: G,
consumer: C,
count: Option<u64>,
block: Option<u64>,
noack: bool,
keys: K,
ids: I
) -> AsyncResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Rk1: FromRedisKey + Hash + Eq + Unpin + Send,
Rk2: FromRedis + Unpin + Send,
Rk3: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
G: Into<Str>,
C: Into<Str>,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A special version of the XREAD
command with support for consumer groups. Read more
sourcefn xreadgroup<R, G, C, K, I>(
&self,
group: G,
consumer: C,
count: Option<u64>,
block: Option<u64>,
noack: bool,
keys: K,
ids: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
G: Into<Str>,
C: Into<Str>,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
fn xreadgroup<R, G, C, K, I>(
&self,
group: G,
consumer: C,
count: Option<u64>,
block: Option<u64>,
noack: bool,
keys: K,
ids: I
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
G: Into<Str>,
C: Into<Str>,
K: Into<MultipleKeys>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A special version of the XREAD
command with support for consumer groups. Read more
sourcefn xack<R, K, G, I>(&self, key: K, group: G, ids: I) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
I: Into<MultipleIDs>,
fn xack<R, K, G, I>(&self, key: K, group: G, ids: I) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Remove one or more messages from the Pending Entries List (PEL) of a stream consumer group. Read more
sourcefn xclaim_values<Ri, Rk, Rv, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: I,
idle: Option<u64>,
time: Option<u64>,
retry_count: Option<u64>,
force: bool,
justid: bool
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<MultipleIDs>,
fn xclaim_values<Ri, Rk, Rv, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: I,
idle: Option<u64>,
time: Option<u64>,
retry_count: Option<u64>,
force: bool,
justid: bool
) -> AsyncResult<Vec<XReadValue<Ri, Rk, Rv>>>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
A variation of xclaim with a less verbose return type.
sourcefn xclaim<R, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: I,
idle: Option<u64>,
time: Option<u64>,
retry_count: Option<u64>,
force: bool,
justid: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<MultipleIDs>,
fn xclaim<R, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: I,
idle: Option<u64>,
time: Option<u64>,
retry_count: Option<u64>,
force: bool,
justid: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<MultipleIDs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
In the context of a stream consumer group, this command changes the ownership of a pending message, so that the new owner is the consumer specified as the command argument. Read more
sourcefn xautoclaim_values<Ri, Rk, Rv, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
count: Option<u64>,
justid: bool
) -> AsyncResult<(String, Vec<XReadValue<Ri, Rk, Rv>>)>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<XID>,
fn xautoclaim_values<Ri, Rk, Rv, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
count: Option<u64>,
justid: bool
) -> AsyncResult<(String, Vec<XReadValue<Ri, Rk, Rv>>)>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
Ri: FromRedis + Unpin + Send,
Rk: FromRedisKey + Hash + Eq + Unpin + Send,
Rv: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<XID>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command transfers ownership of pending stream entries that match the specified criteria. It also converts the response type to a less verbose type declaration and handles potential differences between RESP2 and RESP3. Read more
sourcefn xautoclaim<R, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
count: Option<u64>,
justid: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<XID>,
fn xautoclaim<R, K, G, C, I>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
count: Option<u64>,
justid: bool
) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
C: Into<Str>,
I: Into<XID>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
This command transfers ownership of pending stream entries that match the specified criteria. Read more
sourcefn xpending<R, K, G, A>(&self, key: K, group: G, args: A) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
A: Into<XPendingArgs>,
fn xpending<R, K, G, A>(&self, key: K, group: G, args: A) -> AsyncResult<R>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
R: FromRedis + Unpin + Send,
K: Into<RedisKey>,
G: Into<Str>,
A: Into<XPendingArgs>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Inspect the list of pending messages in a consumer group. Read more
sourceimpl TransactionInterface for RedisClient
impl TransactionInterface for RedisClient
sourcefn multi(&self, abort_on_error: bool) -> AsyncResult<TransactionClient>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn multi(&self, abort_on_error: bool) -> AsyncResult<TransactionClient>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Enter a MULTI block, executing subsequent commands as a transaction. Read more
sourcefn in_transaction(&self) -> bool
fn in_transaction(&self) -> bool
Whether or not the client is currently in the middle of a MULTI transaction.
sourcefn force_discard_transaction(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn force_discard_transaction(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Force the client to abort any in-flight transactions. Read more
sourcefn watch<K>(&self, keys: K) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<MultipleKeys>,
fn watch<K>(&self, keys: K) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
where
K: Into<MultipleKeys>,
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Marks the given keys to be watched for conditional execution of a transaction. Read more
sourcefn unwatch(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
fn unwatch(&self) -> AsyncResult<()>ⓘNotable traits for AsyncResult<T>impl<T> Future for AsyncResult<T> where
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
T: Unpin + Send + 'static, type Output = Result<T, RedisError>;
Flushes all the previously watched keys for a transaction. Read more
Auto Trait Implementations
impl !RefUnwindSafe for RedisClient
impl Send for RedisClient
impl Sync for RedisClient
impl Unpin for RedisClient
impl !UnwindSafe for RedisClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Causes self
to use its Binary
implementation when Debug
-formatted.
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Causes self
to use its Octal
implementation when Debug
-formatted.
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pipe for T where
T: ?Sized,
impl<T> Pipe for T where
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
Pipes by value. This is generally the method you want to use. Read more
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
Borrows self
and passes that borrow into the pipe function. Read more
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
Mutably borrows self
and passes that borrow into the pipe function. Read more
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.borrow()
into the pipe function. Read more
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.borrow_mut()
into the pipe
function. Read more
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.as_ref()
into the pipe function.
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.as_mut()
into the pipe
function. Read more
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.deref()
into the pipe function.
impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
impl<T> PipeDeref for T
impl<T> PipeDeref for T
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more
impl<T> PipeRef for T
impl<T> PipeRef for T
impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Immutable access to the Borrow<B>
of a value. Read more
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the BorrowMut<B>
of a value. Read more
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Immutable access to the AsRef<R>
view of a value. Read more
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Mutable access to the AsMut<R>
view of a value. Read more
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the Deref::Target
of a value. Read more
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the Deref::Target
of a value. Read more
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls .tap()
only in debug builds, and is erased in release builds.
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls .tap_mut()
only in debug builds, and is erased in release
builds. Read more
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Calls .tap_borrow()
only in debug builds, and is erased in release
builds. Read more
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Calls .tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Calls .tap_ref()
only in debug builds, and is erased in release
builds. Read more
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Calls .tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more
impl<T> Tap for T
impl<T> Tap for T
fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
Provides immutable access for inspection. Read more
fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
Calls tap
in debug builds, and does nothing in release builds.
fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
Provides mutable access for modification. Read more
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
Calls tap_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Provides immutable access to the reference for inspection.
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Calls tap_ref
in debug builds, and does nothing in release builds.
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the reference for modification.
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_ref_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Provides immutable access to the borrow for inspection. Read more
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Calls tap_borrow
in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_borrow_mut
in debug builds, and does nothing in release
builds. Read more
impl<T> TapDeref for T
impl<T> TapDeref for T
fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Immutably dereferences self
for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref
in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self
for modification.
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Calls tap_deref_mut
in debug builds, and does nothing in release
builds. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more