pub struct Transaction { /* private fields */ }Available on crate feature
transactions only.Expand description
A cheaply cloneable transaction block.
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub async fn exec<R>(&self, abort_on_error: bool) -> Result<R, Error>where
R: FromValue,
pub async fn exec<R>(&self, abort_on_error: bool) -> Result<R, Error>where
R: FromValue,
Executes all previously queued commands in a transaction.
If abort_on_error is true the client will automatically send DISCARD if an error is received from
any of the commands prior to EXEC. This does not apply to MOVED or ASK errors, which wll be followed
automatically.
https://redis.io/commands/exec
async fn example(client: &Client) -> Result<(), Error> {
let _ = client.mset(vec![("foo", 1), ("bar", 2)]).await?;
let trx = client.multi();
let _: () = trx.get("foo").await?; // returns QUEUED
let _: () = trx.get("bar").await?; // returns QUEUED
let (foo, bar): (i64, i64) = trx.exec(false).await?;
assert_eq!((foo, bar), (1, 2));
Ok(())
}Sourcepub fn hash_slot(&self) -> Option<u16>
pub fn hash_slot(&self) -> Option<u16>
Read the hash slot against which this transaction will run, if known.
Sourcepub fn cluster_node(&self) -> Option<Server>
pub fn cluster_node(&self) -> Option<Server>
Read the server ID against which this transaction will run, if known.
Trait Implementations§
Source§impl AclInterface for Transaction
Available on crate feature i-acl only.
impl AclInterface for Transaction
Available on crate feature
i-acl only.Source§fn acl_setuser<S, V>(
&self,
username: S,
rules: V,
) -> impl Future<Output = FredResult<()>> + Send
fn acl_setuser<S, V>( &self, username: S, rules: V, ) -> impl Future<Output = FredResult<()>> + Send
Create an ACL user with the specified rules or modify the rules of an existing user. Read more
Source§fn acl_load(&self) -> impl Future<Output = FredResult<()>> + Send
fn acl_load(&self) -> impl Future<Output = FredResult<()>> + Send
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
Source§fn acl_save(&self) -> impl Future<Output = FredResult<()>> + Send
fn acl_save(&self) -> impl Future<Output = FredResult<()>> + Send
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
Source§fn acl_list<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_list<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The command shows the currently active ACL rules in the Redis server. Read more
Source§fn acl_users<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_users<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The command shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more
Source§fn acl_getuser<R, U>(
&self,
username: U,
) -> impl Future<Output = FredResult<R>> + Send
fn acl_getuser<R, U>( &self, username: U, ) -> impl Future<Output = FredResult<R>> + Send
The command returns all the rules defined for an existing ACL user. Read more
Source§fn acl_deluser<R, S>(
&self,
usernames: S,
) -> impl Future<Output = FredResult<R>> + Send
fn acl_deluser<R, S>( &self, usernames: S, ) -> impl Future<Output = FredResult<R>> + Send
Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Read more
Source§fn acl_cat<R>(
&self,
category: Option<Str>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_cat<R>(
&self,
category: Option<Str>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
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
Source§fn acl_genpass<R>(
&self,
bits: Option<u16>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_genpass<R>(
&self,
bits: Option<u16>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Generate a password with length
bits, returning the password. Read moreSource§fn acl_whoami<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_whoami<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the username the current connection is authenticated with. New connections are authenticated
with the “default” user. Read more
Source§fn acl_log_count<R>(
&self,
count: Option<u32>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn acl_log_count<R>(
&self,
count: Option<u32>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Read
count recent ACL security events. Read moreSource§fn acl_log_reset(&self) -> impl Future<Output = FredResult<()>> + Send
fn acl_log_reset(&self) -> impl Future<Output = FredResult<()>> + Send
Clear the ACL security events logs. Read more
Source§impl AuthInterface for Transaction
impl AuthInterface for Transaction
Source§impl ClientInterface for Transaction
Available on crate feature i-client only.
impl ClientInterface for Transaction
Available on crate feature
i-client only.Source§fn client_id<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_id<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the ID of the current connection. Read more
Source§fn connection_ids(&self) -> HashMap<Server, i64>
fn connection_ids(&self) -> HashMap<Server, i64>
Read the connection IDs for the active connections to each server. Read more
Source§fn client_info<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_info<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The command returns information and statistics about the current client connection in a mostly human readable
format. Read more
Source§fn client_kill<R>(
&self,
filters: Vec<ClientKillFilter>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_kill<R>(
&self,
filters: Vec<ClientKillFilter>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Close a given connection or set of connections. Read more
Source§fn client_list<R, I>(
&self,
type: Option<ClientKillType>,
ids: Option<Vec<String>>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_list<R, I>(
&self,
type: Option<ClientKillType>,
ids: Option<Vec<String>>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The CLIENT LIST command returns information and statistics about the client connections server in a mostly human
readable format. Read more
Source§fn client_getname<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_getname<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The CLIENT GETNAME returns the name of the current connection as set by CLIENT SETNAME. Read more
Source§fn client_setname<S>(
&self,
name: S,
) -> impl Future<Output = FredResult<()>> + Send
fn client_setname<S>( &self, name: S, ) -> impl Future<Output = FredResult<()>> + Send
Assign a name to the current connection. Read more
Source§fn client_pause(
&self,
timeout: i64,
mode: Option<ClientPauseKind>,
) -> impl Future<Output = FredResult<()>> + Send
fn client_pause( &self, timeout: i64, mode: Option<ClientPauseKind>, ) -> impl Future<Output = FredResult<()>> + Send
CLIENT PAUSE is a connections control command able to suspend all the Redis clients for the specified amount of
time (in milliseconds). Read more
Source§fn client_unpause(&self) -> impl Future<Output = FredResult<()>> + Send
fn client_unpause(&self) -> impl Future<Output = FredResult<()>> + Send
CLIENT UNPAUSE is used to resume command processing for all clients that were paused by CLIENT PAUSE. Read more
Source§fn client_reply(
&self,
flag: ClientReplyFlag,
) -> impl Future<Output = FredResult<()>> + Send
fn client_reply( &self, flag: ClientReplyFlag, ) -> impl Future<Output = FredResult<()>> + Send
The CLIENT REPLY command controls whether the server will reply the client’s commands. The following modes are
available: Read more
Source§fn client_unblock<R, S>(
&self,
id: S,
flag: Option<ClientUnblockFlag>,
) -> impl Future<Output = FredResult<R>> + Send
fn client_unblock<R, S>( &self, id: S, flag: Option<ClientUnblockFlag>, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn unblock_self(
&self,
flag: Option<ClientUnblockFlag>,
) -> impl Future<Output = FredResult<()>> + Send
fn unblock_self( &self, flag: Option<ClientUnblockFlag>, ) -> impl Future<Output = FredResult<()>> + Send
A convenience function to unblock any blocked connection on this client.
Source§fn echo<R, M>(&self, message: M) -> impl Future<Output = FredResult<R>> + Send
fn echo<R, M>(&self, message: M) -> impl Future<Output = FredResult<R>> + Send
Returns message. Read more
Source§fn client_tracking<R, T, P>(
&self,
toggle: T,
redirect: Option<i64>,
prefixes: P,
bcast: bool,
optin: bool,
optout: bool,
noloop: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn client_tracking<R, T, P>( &self, toggle: T, redirect: Option<i64>, prefixes: P, bcast: bool, optin: bool, optout: bool, noloop: bool, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-tracking only.This command enables the tracking feature of the Redis server that is used for server assisted client side
caching. Read more
Source§fn client_trackinginfo<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_trackinginfo<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Available on crate feature
i-tracking only.The command returns information about the current client connection’s use of the server assisted client side
caching feature. Read more
Source§fn client_getredir<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_getredir<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Available on crate feature
i-tracking only.This command returns the client ID we are redirecting our tracking notifications to. Read more
Source§fn client_caching<R>(
&self,
enabled: bool,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn client_caching<R>(
&self,
enabled: bool,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Available on crate feature
i-tracking only.This command controls the tracking of the keys in the next command executed by the connection, when tracking is
enabled in OPTIN or OPTOUT mode. Read more
Source§impl ClientLike for Transaction
impl ClientLike for Transaction
Source§fn client_config(&self) -> Config
fn client_config(&self) -> Config
Read the config used to initialize the client.
Source§fn client_reconnect_policy(&self) -> Option<ReconnectPolicy>
fn client_reconnect_policy(&self) -> Option<ReconnectPolicy>
Read the reconnect policy used to initialize the client.
Source§fn connection_config(&self) -> &ConnectionConfig
fn connection_config(&self) -> &ConnectionConfig
Read the connection config used to initialize the client.
Source§fn protocol_version(&self) -> RespVersion
fn protocol_version(&self) -> RespVersion
Read the RESP version used by the client when communicating with the server.
Source§fn has_reconnect_policy(&self) -> bool
fn has_reconnect_policy(&self) -> bool
Whether the client has a reconnection policy.
Source§fn is_clustered(&self) -> bool
fn is_clustered(&self) -> bool
Whether the client is connected to a cluster.
Source§fn uses_sentinels(&self) -> bool
fn uses_sentinels(&self) -> bool
Whether the client uses the sentinel interface.
Source§fn update_perf_config(&self, config: PerformanceConfig)
fn update_perf_config(&self, config: PerformanceConfig)
Update the internal PerformanceConfig in place with new values.
Source§fn perf_config(&self) -> PerformanceConfig
fn perf_config(&self) -> PerformanceConfig
Read the PerformanceConfig associated with this client.
Source§fn state(&self) -> ClientState
fn state(&self) -> ClientState
Read the state of the underlying connection(s). Read more
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Whether all underlying connections are healthy.
Source§fn active_connections(&self) -> Vec<Server>
fn active_connections(&self) -> Vec<Server>
Read the set of active connections managed by the client.
Source§fn server_version(&self) -> Option<Version>
fn server_version(&self) -> Option<Version>
Read the server version, if known.
Source§fn set_resolver(&self, resolver: Arc<dyn Resolve>) -> impl Future + Send
fn set_resolver(&self, resolver: Arc<dyn Resolve>) -> impl Future + Send
Available on crate feature
dns only.Override the DNS resolution logic for the client.
Source§fn connect(&self) -> ConnectHandle
fn connect(&self) -> ConnectHandle
Connect to the server. Read more
Source§fn force_reconnection(&self) -> impl Future<Output = FredResult<()>> + Send
fn force_reconnection(&self) -> impl Future<Output = FredResult<()>> + Send
Force a reconnection to the server(s). Read more
Source§fn wait_for_connect(&self) -> impl Future<Output = FredResult<()>> + Send
fn wait_for_connect(&self) -> impl Future<Output = FredResult<()>> + Send
Wait for the result of the next connection attempt. Read more
Source§fn init(&self) -> impl Future<Output = FredResult<ConnectHandle>> + Send
fn init(&self) -> impl Future<Output = FredResult<ConnectHandle>> + Send
Initialize a new routing and connection task and wait for it to connect successfully. Read more
Source§fn quit(&self) -> impl Future<Output = FredResult<()>> + Send
fn quit(&self) -> impl Future<Output = FredResult<()>> + Send
Close the connection to the 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
Source§fn shutdown(
&self,
flags: Option<ShutdownFlags>,
) -> impl Future<Output = FredResult<()>> + Send
fn shutdown( &self, flags: Option<ShutdownFlags>, ) -> impl Future<Output = FredResult<()>> + Send
Available on crate feature
i-server only.Shut down the server and quit the client. Read more
Source§fn flushall<R>(&self, async: bool) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn flushall<R>(&self, async: bool) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Delete the keys in all databases. Read more
Source§fn flushall_cluster(&self) -> impl Future<Output = FredResult<()>> + Send
fn flushall_cluster(&self) -> impl Future<Output = FredResult<()>> + Send
Delete the keys on all nodes in the cluster. This is a special function that does not map directly to the server
interface.
Source§fn ping<R>(
&self,
message: Option<String>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn ping<R>(
&self,
message: Option<String>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Ping the server. Read more
Source§fn info<R>(
&self,
section: Option<InfoKind>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn info<R>(
&self,
section: Option<InfoKind>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Read info about the server. Read more
Source§fn custom<R, T>(
&self,
cmd: CustomCommand,
args: Vec<T>,
) -> impl Future<Output = FredResult<R>> + Send
fn custom<R, T>( &self, cmd: CustomCommand, args: Vec<T>, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn custom_raw<T>(
&self,
cmd: CustomCommand,
args: Vec<T>,
) -> impl Future<Output = FredResult<Resp3Frame>> + Send
fn custom_raw<T>( &self, cmd: CustomCommand, args: Vec<T>, ) -> impl Future<Output = FredResult<Resp3Frame>> + Send
Source§fn with_options(&self, options: &Options) -> WithOptions<Self>
fn with_options(&self, options: &Options) -> WithOptions<Self>
Customize various configuration options on commands.
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigInterface for Transaction
Available on crate feature i-config only.
impl ConfigInterface for Transaction
Available on crate feature
i-config only.Source§fn config_resetstat(&self) -> impl Future<Output = FredResult<()>> + Send
fn config_resetstat(&self) -> impl Future<Output = FredResult<()>> + Send
Resets the statistics reported by Redis using the INFO command. Read more
Source§fn config_rewrite(&self) -> impl Future<Output = FredResult<()>> + Send
fn config_rewrite(&self) -> impl Future<Output = FredResult<()>> + Send
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
Source§fn config_get<R, S>(
&self,
parameter: S,
) -> impl Future<Output = FredResult<R>> + Send
fn config_get<R, S>( &self, parameter: S, ) -> impl Future<Output = FredResult<R>> + Send
The CONFIG GET command is used to read the configuration parameters of a running Redis server. Read more
Source§fn config_set<P, V>(
&self,
parameter: P,
value: V,
) -> impl Future<Output = FredResult<()>> + Send
fn config_set<P, V>( &self, parameter: P, value: V, ) -> impl Future<Output = FredResult<()>> + Send
The CONFIG SET command is used in order to reconfigure the server at run time without the need to restart Redis. Read more
Source§impl Debug for Transaction
impl Debug for Transaction
Source§impl FunctionInterface for Transaction
Available on crate feature i-scripts only.
impl FunctionInterface for Transaction
Available on crate feature
i-scripts only.Source§fn fcall<R, F, K, V>(
&self,
func: F,
keys: K,
args: V,
) -> impl Future<Output = FredResult<R>> + Send
fn fcall<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = FredResult<R>> + Send
Invoke a function. Read more
Source§fn fcall_ro<R, F, K, V>(
&self,
func: F,
keys: K,
args: V,
) -> impl Future<Output = FredResult<R>> + Send
fn fcall_ro<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = FredResult<R>> + Send
This is a read-only variant of the FCALL command that cannot execute commands that modify data. Read more
Source§fn function_delete<R, S>(
&self,
library_name: S,
) -> impl Future<Output = FredResult<R>> + Send
fn function_delete<R, S>( &self, library_name: S, ) -> impl Future<Output = FredResult<R>> + Send
Delete a library and all its functions. Read more
Source§fn function_delete_cluster<S>(
&self,
library_name: S,
) -> impl Future<Output = FredResult<()>> + Send
fn function_delete_cluster<S>( &self, library_name: S, ) -> impl Future<Output = FredResult<()>> + Send
Delete a library and all its functions from each cluster node concurrently. Read more
Source§fn function_dump<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn function_dump<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the serialized payload of loaded libraries. Read more
Source§fn function_flush<R>(
&self,
async: bool,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn function_flush<R>(
&self,
async: bool,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Deletes all the libraries. Read more
Source§fn function_flush_cluster(
&self,
async: bool,
) -> impl Future<Output = FredResult<()>> + Send
fn function_flush_cluster( &self, async: bool, ) -> impl Future<Output = FredResult<()>> + Send
Deletes all the libraries on all cluster nodes concurrently. Read more
Source§fn function_kill<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn function_kill<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Kill a function that is currently executing. Read more
Source§fn function_list<R, S>(
&self,
library_name: Option<S>,
withcode: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn function_list<R, S>( &self, library_name: Option<S>, withcode: bool, ) -> impl Future<Output = FredResult<R>> + Send
Return information about the functions and libraries. Read more
Source§fn function_load<R, S>(
&self,
replace: bool,
code: S,
) -> impl Future<Output = FredResult<R>> + Send
fn function_load<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = FredResult<R>> + Send
Load a library to Redis. Read more
Source§fn function_load_cluster<R, S>(
&self,
replace: bool,
code: S,
) -> impl Future<Output = FredResult<R>> + Send
fn function_load_cluster<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = FredResult<R>> + Send
Load a library to Redis on all cluster nodes concurrently. Read more
Source§fn function_restore<R, B, P>(
&self,
serialized: B,
policy: P,
) -> impl Future<Output = FredResult<R>> + Send
fn function_restore<R, B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = FredResult<R>> + Send
Restore libraries from the serialized payload. Read more
Source§fn function_restore_cluster<B, P>(
&self,
serialized: B,
policy: P,
) -> impl Future<Output = FredResult<()>> + Send
fn function_restore_cluster<B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = FredResult<()>> + Send
Restore libraries from the serialized payload on all cluster nodes concurrently. Read more
Source§fn function_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn function_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return information about the function that’s currently running and information about the available execution
engines. Read more
Source§impl GeoInterface for Transaction
Available on crate feature i-geo only.
impl GeoInterface for Transaction
Available on crate feature
i-geo only.Source§fn geoadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
changed: bool,
values: V,
) -> impl Future<Output = FredResult<R>> + Send
fn geoadd<R, K, V>( &self, key: K, options: Option<SetOptions>, changed: bool, values: V, ) -> impl Future<Output = FredResult<R>> + Send
Adds the specified geospatial items (longitude, latitude, name) to the specified key. Read more
Source§fn geohash<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn geohash<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn geopos<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn geopos<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by
the sorted set at key. Read more
Source§fn geodist<R, K, S, D>(
&self,
key: K,
src: S,
dest: D,
unit: Option<GeoUnit>,
) -> impl Future<Output = FredResult<R>> + Send
fn geodist<R, K, S, D>( &self, key: K, src: S, dest: D, unit: Option<GeoUnit>, ) -> impl Future<Output = FredResult<R>> + Send
Return the distance between two members in the geospatial index represented by the sorted set. Read more
Source§fn georadius<R, 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<Key>,
storedist: Option<Key>,
) -> impl Future<Output = FredResult<R>> + Send
fn georadius<R, 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<Key>, storedist: Option<Key>, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn georadiusbymember<R, 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<Key>,
storedist: Option<Key>,
) -> impl Future<Output = FredResult<R>> + Send
fn georadiusbymember<R, 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<Key>, storedist: Option<Key>, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn geosearch<R, K>(
&self,
key: K,
from_member: Option<Value>,
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,
) -> impl Future<Output = FredResult<R>> + Send
fn geosearch<R, K>( &self, key: K, from_member: Option<Value>, 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, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn geosearchstore<R, D, S>(
&self,
dest: D,
source: S,
from_member: Option<Value>,
from_lonlat: Option<GeoPosition>,
by_radius: Option<(f64, GeoUnit)>,
by_box: Option<(f64, f64, GeoUnit)>,
ord: Option<SortOrder>,
count: Option<(u64, Any)>,
storedist: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn geosearchstore<R, D, S>( &self, dest: D, source: S, from_member: Option<Value>, from_lonlat: Option<GeoPosition>, by_radius: Option<(f64, GeoUnit)>, by_box: Option<(f64, f64, GeoUnit)>, ord: Option<SortOrder>, count: Option<(u64, Any)>, storedist: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command is like GEOSEARCH, but stores the result in destination key. Returns the number of members added to
the destination key. Read more
Source§impl HashesInterface for Transaction
Available on crate feature i-hashes only.
impl HashesInterface for Transaction
Available on crate feature
i-hashes only.Source§fn hgetall<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn hgetall<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns all fields and values of the hash stored at
key. Read moreSource§fn hdel<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hdel<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Removes the specified fields from the hash stored at
key. Read moreSource§fn hexists<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hexists<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn hincrby<R, K, F>(
&self,
key: K,
field: F,
increment: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn hincrby<R, K, F>( &self, key: K, field: F, increment: i64, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn hincrbyfloat<R, K, F>(
&self,
key: K,
field: F,
increment: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn hincrbyfloat<R, K, F>( &self, key: K, field: F, increment: f64, ) -> impl Future<Output = FredResult<R>> + Send
Increment the specified
field of a hash stored at key, and representing a floating point number, by the
specified increment. Read moreSource§fn hkeys<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn hkeys<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns all field names in the hash stored at
key. Read moreSource§fn hlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn hlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the number of fields contained in the hash stored at
key. Read moreSource§fn hmset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = FredResult<R>> + Send
fn hmset<R, K, V>( &self, key: K, values: V, ) -> impl Future<Output = FredResult<R>> + Send
Sets the specified fields to their respective values in the hash stored at
key. Read moreSource§fn hset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = FredResult<R>> + Send
fn hset<R, K, V>( &self, key: K, values: V, ) -> impl Future<Output = FredResult<R>> + Send
Sets fields in the hash stored at
key to their provided values. Read moreSource§fn hsetnx<R, K, F, V>(
&self,
key: K,
field: F,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn hsetnx<R, K, F, V>( &self, key: K, field: F, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn hrandfield<R, K>(
&self,
key: K,
count: Option<(i64, bool)>,
) -> impl Future<Output = FredResult<R>> + Send
fn hrandfield<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = FredResult<R>> + Send
When called with just the
key argument, return a random field from the hash value stored at key. Read moreSource§fn hstrlen<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hstrlen<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn hvals<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn hvals<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns all values in the hash stored at
key. Read moreSource§fn httl<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn httl<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.Returns the remaining TTL (time to live) of a hash key’s field(s) that have a set expiration. Read more
Source§fn hexpire<R, K, F>(
&self,
key: K,
seconds: i64,
options: Option<ExpireOptions>,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hexpire<R, K, F>( &self, key: K, seconds: i64, options: Option<ExpireOptions>, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.Set an expiration (TTL or time to live) on one or more fields of a given hash key. Read more
Source§fn hexpire_at<R, K, F>(
&self,
key: K,
time: i64,
options: Option<ExpireOptions>,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hexpire_at<R, K, F>( &self, key: K, time: i64, options: Option<ExpireOptions>, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.HEXPIREAT has the same effect and semantics as HEXPIRE, but instead of specifying the number of seconds for the
TTL (time to live), it takes an absolute Unix timestamp in seconds since Unix epoch. Read more
Source§fn hexpire_time<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hexpire_time<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.Returns the absolute Unix timestamp in seconds since Unix epoch at which the given key’s field(s) will expire. Read more
Source§fn hpttl<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hpttl<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.Like HTTL, this command returns the remaining TTL (time to live) of a field that has an expiration set, but in
milliseconds instead of seconds. Read more
Source§fn hpexpire<R, K, F>(
&self,
key: K,
milliseconds: i64,
options: Option<ExpireOptions>,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hpexpire<R, K, F>( &self, key: K, milliseconds: i64, options: Option<ExpireOptions>, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.This command works like HEXPIRE, but the expiration of a field is specified in milliseconds instead of seconds. Read more
Source§fn hpexpire_at<R, K, F>(
&self,
key: K,
time: i64,
options: Option<ExpireOptions>,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hpexpire_at<R, K, F>( &self, key: K, time: i64, options: Option<ExpireOptions>, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.HPEXPIREAT has the same effect and semantics as HEXPIREAT, but the Unix time at which the field will expire is
specified in milliseconds since Unix epoch instead of seconds. Read more
Source§fn hpexpire_time<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hpexpire_time<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.HPEXPIRETIME has the same semantics as HEXPIRETIME, but returns the absolute Unix expiration timestamp in
milliseconds since Unix epoch instead of seconds. Read more
Source§fn hpersist<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn hpersist<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
Available on crate feature
i-hexpire only.Remove the existing expiration on a hash key’s field(s), turning the field(s) from volatile (a field with
expiration set) to persistent (a field that will never expire as no TTL (time to live) is associated). Read more
Source§impl HyperloglogInterface for Transaction
Available on crate feature i-hyperloglog only.
impl HyperloglogInterface for Transaction
Available on crate feature
i-hyperloglog only.Source§fn pfadd<R, K, V>(
&self,
key: K,
elements: V,
) -> impl Future<Output = FredResult<R>> + Send
fn pfadd<R, K, V>( &self, key: K, elements: V, ) -> impl Future<Output = FredResult<R>> + Send
Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first
argument. Read more
Source§fn pfcount<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn pfcount<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
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
Source§impl KeysInterface for Transaction
Available on crate feature i-keys only.
impl KeysInterface for Transaction
Available on crate feature
i-keys only.Source§fn watch<K>(&self, keys: K) -> impl Future<Output = FredResult<()>> + Send
fn watch<K>(&self, keys: K) -> impl Future<Output = FredResult<()>> + Send
Marks the given keys to be watched for conditional execution of a transaction. Read more
Source§fn unwatch(&self) -> impl Future<Output = FredResult<()>> + Send
fn unwatch(&self) -> impl Future<Output = FredResult<()>> + Send
Flushes all the previously watched keys for a transaction. Read more
Source§fn randomkey<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn randomkey<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return a random key from the currently selected database. Read more
Source§fn copy<R, S, D>(
&self,
source: S,
destination: D,
db: Option<u8>,
replace: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn copy<R, S, D>( &self, source: S, destination: D, db: Option<u8>, replace: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command copies the value stored at the source key to the destination key. Read more
Source§fn dump<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn dump<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Serialize the value stored at
key in a Redis-specific format and return it as bulk string. Read moreSource§fn type<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn type<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the string representation of the type of the value stored at key. The different types that can be
returned are: string, list, set, zset, hash and stream. Read more
Source§fn restore<R, K>(
&self,
key: K,
ttl: i64,
serialized: Value,
replace: bool,
absttl: bool,
idletime: Option<i64>,
frequency: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn restore<R, K>( &self, key: K, ttl: i64, serialized: Value, replace: bool, absttl: bool, idletime: Option<i64>, frequency: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Create a key associated with a value that is obtained by deserializing the provided serialized value Read more
Source§fn set<R, K, V>(
&self,
key: K,
value: V,
expire: Option<Expiration>,
options: Option<SetOptions>,
get: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn set<R, K, V>( &self, key: K, value: V, expire: Option<Expiration>, options: Option<SetOptions>, get: bool, ) -> impl Future<Output = FredResult<R>> + Send
Set a value with optional NX|XX, EX|PX|EXAT|PXAT|KEEPTTL, and GET arguments. Read more
Source§fn get<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn get<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Read a value from the server. Read more
Source§fn getrange<R, K>(
&self,
key: K,
start: usize,
end: usize,
) -> impl Future<Output = FredResult<R>> + Send
fn getrange<R, K>( &self, key: K, start: usize, end: usize, ) -> impl Future<Output = FredResult<R>> + Send
Returns the substring of the string value stored at
key with offsets start and end (both inclusive). Read moreSource§fn setrange<R, K, V>(
&self,
key: K,
offset: u32,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn setrange<R, K, V>( &self, key: K, offset: u32, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Overwrites part of the string stored at
key, starting at the specified offset, for the entire length of
value. Read moreSource§fn getdel<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn getdel<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn strlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn strlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the length of the string value stored at key. An error is returned when key holds a non-string value. Read more
Source§fn del<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn del<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Removes the specified keys. A key is ignored if it does not exist. Read more
Source§fn unlink<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn unlink<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Unlinks the specified keys. A key is ignored if it does not exist Read more
Source§fn rename<R, S, D>(
&self,
source: S,
destination: D,
) -> impl Future<Output = FredResult<R>> + Send
fn rename<R, S, D>( &self, source: S, destination: D, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn renamenx<R, S, D>(
&self,
source: S,
destination: D,
) -> impl Future<Output = FredResult<R>> + Send
fn renamenx<R, S, D>( &self, source: S, destination: D, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn mget<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn mget<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn mset<V>(&self, values: V) -> impl Future<Output = FredResult<()>> + Send
fn mset<V>(&self, values: V) -> impl Future<Output = FredResult<()>> + Send
Sets the given keys to their respective values. Read more
Source§fn msetnx<R, V>(&self, values: V) -> impl Future<Output = FredResult<R>> + Send
fn msetnx<R, V>(&self, values: V) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn incr<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn incr<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Increments the number stored at
key by one. If the key does not exist, it is set to 0 before performing the
operation. Read moreSource§fn incr_by<R, K>(
&self,
key: K,
val: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn incr_by<R, K>( &self, key: K, val: i64, ) -> impl Future<Output = FredResult<R>> + Send
Increments the number stored at
key by val. If the key does not exist, it is set to 0 before performing the
operation. Read moreSource§fn incr_by_float<R, K>(
&self,
key: K,
val: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn incr_by_float<R, K>( &self, key: K, val: f64, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn decr<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn decr<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Decrements the number stored at
key by one. If the key does not exist, it is set to 0 before performing the
operation. Read moreSource§fn decr_by<R, K>(
&self,
key: K,
val: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn decr_by<R, K>( &self, key: K, val: i64, ) -> impl Future<Output = FredResult<R>> + Send
Decrements the number stored at
key by val. If the key does not exist, it is set to 0 before performing the
operation. Read moreSource§fn ttl<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn ttl<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the remaining time to live of a key that has a timeout, in seconds. Read more
Source§fn pttl<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn pttl<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the remaining time to live of a key that has a timeout, in milliseconds. Read more
Source§fn persist<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn persist<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn expire<R, K>(
&self,
key: K,
seconds: i64,
options: Option<ExpireOptions>,
) -> impl Future<Output = FredResult<R>> + Send
fn expire<R, K>( &self, key: K, seconds: i64, options: Option<ExpireOptions>, ) -> impl Future<Output = FredResult<R>> + Send
Set a timeout on key. After the timeout has expired, the key will be automatically deleted. Read more
Source§fn expire_at<R, K>(
&self,
key: K,
timestamp: i64,
options: Option<ExpireOptions>,
) -> impl Future<Output = FredResult<R>> + Send
fn expire_at<R, K>( &self, key: K, timestamp: i64, options: Option<ExpireOptions>, ) -> impl Future<Output = FredResult<R>> + Send
Set a timeout on a key based on a UNIX timestamp. Read more
Source§fn expire_time<R, K>(
&self,
key: K,
) -> impl Future<Output = FredResult<R>> + Send
fn expire_time<R, K>( &self, key: K, ) -> impl Future<Output = FredResult<R>> + Send
Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire. Read more
Source§fn pexpire<R, K>(
&self,
key: K,
milliseconds: i64,
options: Option<ExpireOptions>,
) -> impl Future<Output = FredResult<R>> + Send
fn pexpire<R, K>( &self, key: K, milliseconds: i64, options: Option<ExpireOptions>, ) -> impl Future<Output = FredResult<R>> + Send
This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of
seconds. Read more
Source§fn pexpire_at<R, K>(
&self,
key: K,
timestamp: i64,
options: Option<ExpireOptions>,
) -> impl Future<Output = FredResult<R>> + Send
fn pexpire_at<R, K>( &self, key: K, timestamp: i64, options: Option<ExpireOptions>, ) -> impl Future<Output = FredResult<R>> + Send
PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is
specified in milliseconds instead of seconds. Read more
Source§fn pexpire_time<R, K>(
&self,
key: K,
) -> impl Future<Output = FredResult<R>> + Send
fn pexpire_time<R, K>( &self, key: K, ) -> impl Future<Output = FredResult<R>> + Send
PEXPIRETIME has the same semantic as EXPIRETIME, but returns the absolute Unix expiration timestamp in
milliseconds instead of seconds. Read more
Source§fn exists<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn exists<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns number of keys that exist from the
keys arguments. Read moreSource§impl ListInterface for Transaction
Available on crate feature i-lists only.
impl ListInterface for Transaction
Available on crate feature
i-lists only.Source§fn blmpop<R, K>(
&self,
timeout: f64,
keys: K,
direction: LMoveDirection,
count: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn blmpop<R, K>( &self, timeout: f64, keys: K, direction: LMoveDirection, count: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
The blocking variant of Self::lmpop. Read more
Source§fn blpop<R, K>(
&self,
keys: K,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn blpop<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn brpop<R, K>(
&self,
keys: K,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn brpop<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn brpoplpush<R, S, D>(
&self,
source: S,
destination: D,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn brpoplpush<R, S, D>( &self, source: S, destination: D, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
The blocking equivalent of Self::rpoplpush. Read more
Source§fn blmove<R, S, D>(
&self,
source: S,
destination: D,
source_direction: LMoveDirection,
destination_direction: LMoveDirection,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn blmove<R, S, D>( &self, source: S, destination: D, source_direction: LMoveDirection, destination_direction: LMoveDirection, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
The blocking equivalent of Self::lmove. Read more
Source§fn lmpop<R, K>(
&self,
keys: K,
direction: LMoveDirection,
count: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn lmpop<R, K>( &self, keys: K, direction: LMoveDirection, count: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Pops one or more elements from the first non-empty list key from the list of provided key names. Read more
Source§fn lindex<R, K>(
&self,
key: K,
index: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn lindex<R, K>( &self, key: K, index: i64, ) -> impl Future<Output = FredResult<R>> + Send
Returns the element at index in the list stored at key. Read more
Source§fn linsert<R, K, P, V>(
&self,
key: K,
location: ListLocation,
pivot: P,
element: V,
) -> impl Future<Output = FredResult<R>> + Send
fn linsert<R, K, P, V>( &self, key: K, location: ListLocation, pivot: P, element: V, ) -> impl Future<Output = FredResult<R>> + Send
Inserts element in the list stored at key either before or after the reference value
pivot. Read moreSource§fn llen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn llen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the length of the list stored at key. Read more
Source§fn lpop<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn lpop<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns the first elements of the list stored at key. Read more
Source§fn lpos<R, K, V>(
&self,
key: K,
element: V,
rank: Option<i64>,
count: Option<i64>,
maxlen: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn lpos<R, K, V>( &self, key: K, element: V, rank: Option<i64>, count: Option<i64>, maxlen: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
The command returns the index of matching elements inside a Redis list. Read more
Source§fn lpush<R, K, V>(
&self,
key: K,
elements: V,
) -> impl Future<Output = FredResult<R>> + Send
fn lpush<R, K, V>( &self, key: K, elements: V, ) -> impl Future<Output = FredResult<R>> + Send
Insert all the specified values at the head of the list stored at
key. Read moreSource§fn lpushx<R, K, V>(
&self,
key: K,
elements: V,
) -> impl Future<Output = FredResult<R>> + Send
fn lpushx<R, K, V>( &self, key: K, elements: V, ) -> impl Future<Output = FredResult<R>> + Send
Inserts specified values at the head of the list stored at
key, only if key already exists and holds a list. Read moreSource§fn lrange<R, K>(
&self,
key: K,
start: i64,
stop: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn lrange<R, K>( &self, key: K, start: i64, stop: i64, ) -> impl Future<Output = FredResult<R>> + Send
Returns the specified elements of the list stored at
key. Read moreSource§fn lrem<R, K, V>(
&self,
key: K,
count: i64,
element: V,
) -> impl Future<Output = FredResult<R>> + Send
fn lrem<R, K, V>( &self, key: K, count: i64, element: V, ) -> impl Future<Output = FredResult<R>> + Send
Removes the first
count occurrences of elements equal to element from the list stored at key. Read moreSource§fn lset<R, K, V>(
&self,
key: K,
index: i64,
element: V,
) -> impl Future<Output = FredResult<R>> + Send
fn lset<R, K, V>( &self, key: K, index: i64, element: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn ltrim<R, K>(
&self,
key: K,
start: i64,
stop: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn ltrim<R, K>( &self, key: K, start: i64, stop: i64, ) -> impl Future<Output = FredResult<R>> + Send
Trim an existing list so that it will contain only the specified range of elements specified. Read more
Source§fn rpop<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn rpop<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns the last elements of the list stored at
key. Read moreSource§fn rpoplpush<R, S, D>(
&self,
source: S,
dest: D,
) -> impl Future<Output = FredResult<R>> + Send
fn rpoplpush<R, S, D>( &self, source: S, dest: D, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn lmove<R, S, D>(
&self,
source: S,
dest: D,
source_direction: LMoveDirection,
dest_direction: LMoveDirection,
) -> impl Future<Output = FredResult<R>> + Send
fn lmove<R, S, D>( &self, source: S, dest: D, source_direction: LMoveDirection, dest_direction: LMoveDirection, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn rpush<R, K, V>(
&self,
key: K,
elements: V,
) -> impl Future<Output = FredResult<R>> + Send
fn rpush<R, K, V>( &self, key: K, elements: V, ) -> impl Future<Output = FredResult<R>> + Send
Insert all the specified values at the tail of the list stored at
key. Read moreSource§fn rpushx<R, K, V>(
&self,
key: K,
elements: V,
) -> impl Future<Output = FredResult<R>> + Send
fn rpushx<R, K, V>( &self, key: K, elements: V, ) -> impl Future<Output = FredResult<R>> + Send
Inserts specified values at the tail of the list stored at
key, only if key already exists and holds a list. Read moreSource§fn sort<R, K, S>(
&self,
key: K,
by: Option<Str>,
limit: Option<Limit>,
get: S,
order: Option<SortOrder>,
alpha: bool,
store: Option<Key>,
) -> impl Future<Output = FredResult<R>> + Send
fn sort<R, K, S>( &self, key: K, by: Option<Str>, limit: Option<Limit>, get: S, order: Option<SortOrder>, alpha: bool, store: Option<Key>, ) -> impl Future<Output = FredResult<R>> + Send
Returns or stores the elements contained in the list, set or sorted set at
key. Read moreSource§fn sort_ro<R, K, S>(
&self,
key: K,
by: Option<Str>,
limit: Option<Limit>,
get: S,
order: Option<SortOrder>,
alpha: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn sort_ro<R, K, S>( &self, key: K, by: Option<Str>, limit: Option<Limit>, get: S, order: Option<SortOrder>, alpha: bool, ) -> impl Future<Output = FredResult<R>> + Send
Read-only variant of the SORT command. It is exactly like the original SORT but refuses the STORE option and can
safely be used in read-only replicas. Read more
Source§impl MemoryInterface for Transaction
Available on crate feature i-memory only.
impl MemoryInterface for Transaction
Available on crate feature
i-memory only.Source§fn memory_doctor<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn memory_doctor<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The MEMORY DOCTOR command reports about different memory-related issues that the Redis server experiences, and
advises about possible remedies. Read more
Source§fn memory_malloc_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn memory_malloc_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The MEMORY MALLOC-STATS command provides an internal statistics report from the memory allocator. Read more
Source§fn memory_purge(&self) -> impl Future<Output = FredResult<()>> + Send
fn memory_purge(&self) -> impl Future<Output = FredResult<()>> + Send
The MEMORY PURGE command attempts to purge dirty pages so these can be reclaimed by the allocator. Read more
Source§fn memory_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn memory_stats<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
The MEMORY STATS command returns an Array reply about the memory usage of the server. Read more
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
Source§impl PubsubInterface for Transaction
Available on crate feature i-pubsub only.
impl PubsubInterface for Transaction
Available on crate feature
i-pubsub only.Source§fn subscribe<S>(
&self,
channels: S,
) -> impl Future<Output = FredResult<()>> + Send
fn subscribe<S>( &self, channels: S, ) -> impl Future<Output = FredResult<()>> + Send
Subscribe to a channel on the publish-subscribe interface. Read more
Source§fn unsubscribe<S>(
&self,
channels: S,
) -> impl Future<Output = FredResult<()>> + Send
fn unsubscribe<S>( &self, channels: S, ) -> impl Future<Output = FredResult<()>> + Send
Unsubscribe from a channel on the PubSub interface. Read more
Source§fn psubscribe<S>(
&self,
patterns: S,
) -> impl Future<Output = FredResult<()>> + Send
fn psubscribe<S>( &self, patterns: S, ) -> impl Future<Output = FredResult<()>> + Send
Subscribes the client to the given patterns. Read more
Source§fn punsubscribe<S>(
&self,
patterns: S,
) -> impl Future<Output = FredResult<()>> + Send
fn punsubscribe<S>( &self, patterns: S, ) -> impl Future<Output = FredResult<()>> + Send
Unsubscribes the client from the given patterns, or from all of them if none is given. Read more
Source§fn publish<R, S, V>(
&self,
channel: S,
message: V,
) -> impl Future<Output = FredResult<R>> + Send
fn publish<R, S, V>( &self, channel: S, message: V, ) -> impl Future<Output = FredResult<R>> + Send
Publish a message on the PubSub interface, returning the number of clients that received the message. Read more
Source§fn ssubscribe<C>(
&self,
channels: C,
) -> impl Future<Output = FredResult<()>> + Send
fn ssubscribe<C>( &self, channels: C, ) -> impl Future<Output = FredResult<()>> + Send
Subscribes the client to the specified shard channels. Read more
Source§fn sunsubscribe<C>(
&self,
channels: C,
) -> impl Future<Output = FredResult<()>> + Send
fn sunsubscribe<C>( &self, channels: C, ) -> impl Future<Output = FredResult<()>> + Send
Unsubscribes the client from the given shard channels, or from all of them if none is given. Read more
Source§fn spublish<R, S, V>(
&self,
channel: S,
message: V,
) -> impl Future<Output = FredResult<R>> + Send
fn spublish<R, S, V>( &self, channel: S, message: V, ) -> impl Future<Output = FredResult<R>> + Send
Posts a message to the given shard channel. Read more
Source§fn pubsub_channels<R, S>(
&self,
pattern: S,
) -> impl Future<Output = FredResult<R>> + Send
fn pubsub_channels<R, S>( &self, pattern: S, ) -> impl Future<Output = FredResult<R>> + Send
Lists the currently active channels. Read more
Source§fn pubsub_numpat<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn pubsub_numpat<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Returns the number of unique patterns that are subscribed to by clients. Read more
Source§fn pubsub_numsub<R, S>(
&self,
channels: S,
) -> impl Future<Output = FredResult<R>> + Send
fn pubsub_numsub<R, S>( &self, channels: S, ) -> impl Future<Output = FredResult<R>> + Send
Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels. Read more
Source§fn pubsub_shardchannels<R, S>(
&self,
pattern: S,
) -> impl Future<Output = FredResult<R>> + Send
fn pubsub_shardchannels<R, S>( &self, pattern: S, ) -> impl Future<Output = FredResult<R>> + Send
Lists the currently active shard channels. Read more
Source§fn pubsub_shardnumsub<R, S>(
&self,
channels: S,
) -> impl Future<Output = FredResult<R>> + Send
fn pubsub_shardnumsub<R, S>( &self, channels: S, ) -> impl Future<Output = FredResult<R>> + Send
Returns the number of subscribers for the specified shard channels. Read more
Source§impl RediSearchInterface for Transaction
Available on crate feature i-redisearch only.
impl RediSearchInterface for Transaction
Available on crate feature
i-redisearch only.Source§fn ft_list<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn ft_list<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Returns a list of all existing indexes. Read more
Source§fn ft_aggregate<R, I, Q>(
&self,
index: I,
query: Q,
options: FtAggregateOptions,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_aggregate<R, I, Q>( &self, index: I, query: Q, options: FtAggregateOptions, ) -> impl Future<Output = FredResult<R>> + Send
Run a search query on an index, and perform aggregate transformations on the results. Read more
Source§fn ft_search<R, I, Q>(
&self,
index: I,
query: Q,
options: FtSearchOptions,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_search<R, I, Q>( &self, index: I, query: Q, options: FtSearchOptions, ) -> impl Future<Output = FredResult<R>> + Send
Search the index with a textual query, returning either documents or just ids. Read more
Source§fn ft_create<R, I>(
&self,
index: I,
options: FtCreateOptions,
schema: Vec<SearchSchema>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_create<R, I>( &self, index: I, options: FtCreateOptions, schema: Vec<SearchSchema>, ) -> impl Future<Output = FredResult<R>> + Send
Create an index with the given specification. Read more
Source§fn ft_alter<R, I>(
&self,
index: I,
options: FtAlterOptions,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_alter<R, I>( &self, index: I, options: FtAlterOptions, ) -> impl Future<Output = FredResult<R>> + Send
Add a new attribute to the index. Read more
Source§fn ft_aliasadd<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_aliasadd<R, A, I>( &self, alias: A, index: I, ) -> impl Future<Output = FredResult<R>> + Send
Add an alias to an index. Read more
Source§fn ft_aliasdel<R, A>(
&self,
alias: A,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_aliasdel<R, A>( &self, alias: A, ) -> impl Future<Output = FredResult<R>> + Send
Remove an alias from an index. Read more
Source§fn ft_aliasupdate<R, A, I>(
&self,
alias: A,
index: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_aliasupdate<R, A, I>( &self, alias: A, index: I, ) -> impl Future<Output = FredResult<R>> + Send
Add an alias to an index. If the alias is already associated with another index, FT.ALIASUPDATE removes the
alias association with the previous index. Read more
Source§fn ft_config_get<R, S>(
&self,
option: S,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_config_get<R, S>( &self, option: S, ) -> impl Future<Output = FredResult<R>> + Send
Retrieve configuration options. Read more
Source§fn ft_config_set<R, S, V>(
&self,
option: S,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_config_set<R, S, V>( &self, option: S, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Set the value of a RediSearch configuration parameter. Read more
Source§fn ft_cursor_del<R, I, C>(
&self,
index: I,
cursor: C,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_cursor_del<R, I, C>( &self, index: I, cursor: C, ) -> impl Future<Output = FredResult<R>> + Send
Delete a cursor. Read more
Source§fn ft_cursor_read<R, I, C>(
&self,
index: I,
cursor: C,
count: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_cursor_read<R, I, C>( &self, index: I, cursor: C, count: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
Read next results from an existing cursor. Read more
Source§fn ft_dictadd<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = FredResult<R>>
fn ft_dictadd<R, D, S>( &self, dict: D, terms: S, ) -> impl Future<Output = FredResult<R>>
Add terms to a dictionary. Read more
Source§fn ft_dictdel<R, D, S>(
&self,
dict: D,
terms: S,
) -> impl Future<Output = FredResult<R>>
fn ft_dictdel<R, D, S>( &self, dict: D, terms: S, ) -> impl Future<Output = FredResult<R>>
Remove terms from a dictionary. Read more
Source§fn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = FredResult<R>>
fn ft_dictdump<R, D>(&self, dict: D) -> impl Future<Output = FredResult<R>>
Dump all terms in the given dictionary. Read more
Source§fn ft_dropindex<R, I>(
&self,
index: I,
dd: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_dropindex<R, I>( &self, index: I, dd: bool, ) -> impl Future<Output = FredResult<R>> + Send
Delete an index. Read more
Source§fn ft_explain<R, I, Q>(
&self,
index: I,
query: Q,
dialect: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_explain<R, I, Q>( &self, index: I, query: Q, dialect: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Return the execution plan for a complex query. Read more
Source§fn ft_info<R, I>(&self, index: I) -> impl Future<Output = FredResult<R>> + Send
fn ft_info<R, I>(&self, index: I) -> impl Future<Output = FredResult<R>> + Send
Return information and statistics on the index. Read more
Source§fn ft_spellcheck<R, I, Q>(
&self,
index: I,
query: Q,
distance: Option<u8>,
terms: Option<SpellcheckTerms>,
dialect: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_spellcheck<R, I, Q>( &self, index: I, query: Q, distance: Option<u8>, terms: Option<SpellcheckTerms>, dialect: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Perform spelling correction on a query, returning suggestions for misspelled terms. Read more
Source§fn ft_sugadd<R, K, S>(
&self,
key: K,
string: S,
score: f64,
incr: bool,
payload: Option<Bytes>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_sugadd<R, K, S>( &self, key: K, string: S, score: f64, incr: bool, payload: Option<Bytes>, ) -> impl Future<Output = FredResult<R>> + Send
Add a suggestion string to an auto-complete suggestion dictionary. Read more
Source§fn ft_sugdel<R, K, S>(
&self,
key: K,
string: S,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_sugdel<R, K, S>( &self, key: K, string: S, ) -> impl Future<Output = FredResult<R>> + Send
Delete a string from a suggestion index. Read more
Source§fn ft_sugget<R, K, P>(
&self,
key: K,
prefix: P,
fuzzy: bool,
withscores: bool,
withpayloads: bool,
max: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_sugget<R, K, P>( &self, key: K, prefix: P, fuzzy: bool, withscores: bool, withpayloads: bool, max: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
Get completion suggestions for a prefix. Read more
Source§fn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn ft_suglen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Get the size of an auto-complete suggestion dictionary. Read more
Source§fn ft_syndump<R, I>(
&self,
index: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_syndump<R, I>( &self, index: I, ) -> impl Future<Output = FredResult<R>> + Send
Dump the contents of a synonym group. Read more
Source§fn ft_synupdate<R, I, S, T>(
&self,
index: I,
synonym_group_id: S,
skipinitialscan: bool,
terms: T,
) -> impl Future<Output = FredResult<R>> + Send
fn ft_synupdate<R, I, S, T>( &self, index: I, synonym_group_id: S, skipinitialscan: bool, terms: T, ) -> impl Future<Output = FredResult<R>> + Send
Update a synonym group. Read more
Source§impl RedisJsonInterface for Transaction
Available on crate feature i-redis-json only.
impl RedisJsonInterface for Transaction
Available on crate feature
i-redis-json only.Source§fn json_arrappend<R, K, P, V>(
&self,
key: K,
path: P,
values: Vec<V>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrappend<R, K, P, V>( &self, key: K, path: P, values: Vec<V>, ) -> impl Future<Output = FredResult<R>> + Send
Append the json values into the array at path after the last element in it. Read more
Source§fn json_arrindex<R, K, P, V>(
&self,
key: K,
path: P,
value: V,
start: Option<i64>,
stop: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrindex<R, K, P, V>( &self, key: K, path: P, value: V, start: Option<i64>, stop: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Search for the first occurrence of a JSON value in an array. Read more
Source§fn json_arrinsert<R, K, P, V>(
&self,
key: K,
path: P,
index: i64,
values: Vec<V>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrinsert<R, K, P, V>( &self, key: K, path: P, index: i64, values: Vec<V>, ) -> impl Future<Output = FredResult<R>> + Send
Insert the json values into the array at path before the index (shifts to the right). Read more
Source§fn json_arrlen<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrlen<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Report the length of the JSON array at path in key. Read more
Source§fn json_arrpop<R, K, P>(
&self,
key: K,
path: Option<P>,
index: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrpop<R, K, P>( &self, key: K, path: Option<P>, index: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Remove and return an element from the index in the array Read more
Source§fn json_arrtrim<R, K, P>(
&self,
key: K,
path: P,
start: i64,
stop: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn json_arrtrim<R, K, P>( &self, key: K, path: P, start: i64, stop: i64, ) -> impl Future<Output = FredResult<R>> + Send
Trim an array so that it contains only the specified inclusive range of elements Read more
Source§fn json_clear<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_clear<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Clear container values (arrays/objects) and set numeric values to 0 Read more
Source§fn json_debug_memory<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_debug_memory<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Report a value’s memory usage in bytes Read more
Source§fn json_del<R, K, P>(
&self,
key: K,
path: P,
) -> impl Future<Output = FredResult<R>> + Send
fn json_del<R, K, P>( &self, key: K, path: P, ) -> impl Future<Output = FredResult<R>> + Send
Delete a value. Read more
Source§fn json_get<R, K, I, N, S, P>(
&self,
key: K,
indent: Option<I>,
newline: Option<N>,
space: Option<S>,
paths: P,
) -> impl Future<Output = FredResult<R>> + Send
fn json_get<R, K, I, N, S, P>( &self, key: K, indent: Option<I>, newline: Option<N>, space: Option<S>, paths: P, ) -> impl Future<Output = FredResult<R>> + Send
Return the value at path in JSON serialized form. Read more
Source§fn json_merge<R, K, P, V>(
&self,
key: K,
path: P,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn json_merge<R, K, P, V>( &self, key: K, path: P, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Merge a given JSON value into matching paths. Read more
Source§fn json_mget<R, K, P>(
&self,
keys: K,
path: P,
) -> impl Future<Output = FredResult<R>> + Send
fn json_mget<R, K, P>( &self, keys: K, path: P, ) -> impl Future<Output = FredResult<R>> + Send
Return the values at path from multiple key arguments. Read more
Source§fn json_mset<R, K, P, V>(
&self,
values: Vec<(K, P, V)>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_mset<R, K, P, V>( &self, values: Vec<(K, P, V)>, ) -> impl Future<Output = FredResult<R>> + Send
Set or update one or more JSON values according to the specified key-path-value triplets. Read more
Source§fn json_numincrby<R, K, P, V>(
&self,
key: K,
path: P,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn json_numincrby<R, K, P, V>( &self, key: K, path: P, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Increment the number value stored at path by number Read more
Source§fn json_objkeys<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_objkeys<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Return the keys in the object that’s referenced by path. Read more
Source§fn json_objlen<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_objlen<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Report the number of keys in the JSON object at path in key. Read more
Source§fn json_resp<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_resp<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Return the JSON in key in Redis serialization protocol specification form. Read more
Source§fn json_set<R, K, P, V>(
&self,
key: K,
path: P,
value: V,
options: Option<SetOptions>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_set<R, K, P, V>( &self, key: K, path: P, value: V, options: Option<SetOptions>, ) -> impl Future<Output = FredResult<R>> + Send
Set the JSON value at path in key. Read more
Source§fn json_strappend<R, K, P, V>(
&self,
key: K,
path: Option<P>,
value: V,
) -> impl Future<Output = FredResult<R>> + Send
fn json_strappend<R, K, P, V>( &self, key: K, path: Option<P>, value: V, ) -> impl Future<Output = FredResult<R>> + Send
Append the json-string values to the string at path. Read more
Source§fn json_strlen<R, K, P>(
&self,
key: K,
path: Option<P>,
) -> impl Future<Output = FredResult<R>> + Send
fn json_strlen<R, K, P>( &self, key: K, path: Option<P>, ) -> impl Future<Output = FredResult<R>> + Send
Report the length of the JSON String at path in key. Read more
Source§fn json_toggle<R, K, P>(
&self,
key: K,
path: P,
) -> impl Future<Output = FredResult<R>> + Send
fn json_toggle<R, K, P>( &self, key: K, path: P, ) -> impl Future<Output = FredResult<R>> + Send
Toggle a Boolean value stored at path. Read more
Source§impl ServerInterface for Transaction
Available on crate feature i-server only.
impl ServerInterface for Transaction
Available on crate feature
i-server only.Source§fn bgrewriteaof<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn bgrewriteaof<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Instruct Redis to start an Append Only File rewrite process. Read more
Source§fn bgsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn bgsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Save the DB in background. Read more
Source§fn dbsize<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn dbsize<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the number of keys in the selected database. Read more
Source§fn select<I>(&self, index: I) -> impl Future<Output = FredResult<()>> + Send
fn select<I>(&self, index: I) -> impl Future<Output = FredResult<()>> + Send
Select the database this client should use. Read more
Source§fn failover(
&self,
to: Option<(String, u16)>,
force: bool,
abort: bool,
timeout: Option<u32>,
) -> impl Future<Output = FredResult<()>> + Send
fn failover( &self, to: Option<(String, u16)>, force: bool, abort: bool, timeout: Option<u32>, ) -> impl Future<Output = FredResult<()>> + Send
This command will start a coordinated failover between the currently-connected-to master and one of its
replicas. Read more
Source§fn lastsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn lastsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the UNIX TIME of the last DB save executed with success. Read more
Source§fn wait<R>(
&self,
numreplicas: i64,
timeout: i64,
) -> impl Future<Output = Result<R, Error>> + Sendwhere
R: FromValue,
fn wait<R>(
&self,
numreplicas: i64,
timeout: i64,
) -> impl Future<Output = Result<R, Error>> + Sendwhere
R: FromValue,
This command blocks the current client until all the previous write commands are successfully transferred and
acknowledged by at least the specified number of replicas. If the timeout, specified in milliseconds, is
reached, the command returns even if the specified number of replicas were not yet reached. Read more
Source§fn sentinel_primary(&self) -> Option<Server>
fn sentinel_primary(&self) -> Option<Server>
Read the primary Redis server identifier returned from the sentinel nodes.
Source§impl SetsInterface for Transaction
Available on crate feature i-sets only.
impl SetsInterface for Transaction
Available on crate feature
i-sets only.Source§fn sadd<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn sadd<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Add the specified members to the set stored at
key. Read moreSource§fn scard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn scard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the set cardinality (number of elements) of the set stored at
key. Read moreSource§fn sdiff<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sdiff<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the difference between the first set and all the successive sets. Read more
Source§fn sdiffstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sdiffstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in
destination. Read moreSource§fn sinter<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sinter<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the intersection of all the given sets. Read more
Source§fn sinterstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sinterstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SINTER, but instead of returning the resulting set, it is stored in
destination. Read moreSource§fn sismember<R, K, V>(
&self,
key: K,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn sismember<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn smismember<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn smismember<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Returns whether each member is a member of the set stored at
key. Read moreSource§fn smembers<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn smembers<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns all the members of the set value stored at
key. Read moreSource§fn smove<R, S, D, V>(
&self,
source: S,
dest: D,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn smove<R, S, D, V>( &self, source: S, dest: D, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn spop<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn spop<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns one or more random members from the set value store at
key. Read moreSource§fn srandmember<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn srandmember<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
When called with just the key argument, return a random element from the set value stored at
key. Read moreSource§fn srem<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn srem<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Remove the specified members from the set stored at
key. Read moreSource§fn sunion<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sunion<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the union of all the given sets. Read more
Source§fn sunionstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sunionstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SUNION, but instead of returning the resulting set, it is stored in
destination. Read moreSource§impl SortedSetsInterface for Transaction
Available on crate feature i-sorted-sets only.
impl SortedSetsInterface for Transaction
Available on crate feature
i-sorted-sets only.Source§fn bzmpop<R, K>(
&self,
timeout: f64,
keys: K,
sort: ZCmp,
count: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn bzmpop<R, K>( &self, timeout: f64, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
The blocking variant of Self::zmpop. Read more
Source§fn bzpopmin<R, K>(
&self,
keys: K,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn bzpopmin<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
The blocking variant of Self::zpopmin. Read more
Source§fn bzpopmax<R, K>(
&self,
keys: K,
timeout: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn bzpopmax<R, K>( &self, keys: K, timeout: f64, ) -> impl Future<Output = FredResult<R>> + Send
The blocking variant of Self::zpopmax. Read more
Source§fn zadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
ordering: Option<Ordering>,
changed: bool,
incr: bool,
values: V,
) -> impl Future<Output = FredResult<R>> + Send
fn zadd<R, K, V>( &self, key: K, options: Option<SetOptions>, ordering: Option<Ordering>, changed: bool, incr: bool, values: V, ) -> impl Future<Output = FredResult<R>> + Send
Adds all the specified members with the specified scores to the sorted set stored at
key. Read moreSource§fn zcard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn zcard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the sorted set cardinality (number of elements) of the sorted set stored at
key. Read moreSource§fn zcount<R, K>(
&self,
key: K,
min: f64,
max: f64,
) -> impl Future<Output = FredResult<R>> + Send
fn zcount<R, K>( &self, key: K, min: f64, max: f64, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn zdiff<R, K>(
&self,
keys: K,
withscores: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zdiff<R, K>( &self, keys: K, withscores: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command is similar to ZDIFFSTORE, but instead of storing the resulting sorted set, it is returned to the
client. Read more
Source§fn zdiffstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn zdiffstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
Computes the difference between the first and all successive input sorted sets and stores the result in
destination. Read moreSource§fn zincrby<R, K, V>(
&self,
key: K,
increment: f64,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn zincrby<R, K, V>( &self, key: K, increment: f64, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn zinter<R, K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zinter<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command is similar to ZINTERSTORE, but instead of storing the resulting sorted set, it is returned to the
client. Read more
Source§fn zinterstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send,
W: Into<MultipleWeights> + Send,
fn zinterstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send,
W: Into<MultipleWeights> + Send,
Computes the intersection of the sorted sets given by the specified keys, and stores the result in
destination. Read moreSource§fn zlexcount<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
) -> impl Future<Output = FredResult<R>> + Send
fn zlexcount<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn zpopmax<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn zpopmax<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns up to count members with the highest scores in the sorted set stored at
key. Read moreSource§fn zpopmin<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn zpopmin<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns up to count members with the lowest scores in the sorted set stored at
key. Read moreSource§fn zmpop<R, K>(
&self,
keys: K,
sort: ZCmp,
count: Option<i64>,
) -> impl Future<Output = FredResult<R>> + Send
fn zmpop<R, K>( &self, keys: K, sort: ZCmp, count: Option<i64>, ) -> impl Future<Output = FredResult<R>> + Send
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list
of key names. Read more
Source§fn zrandmember<R, K>(
&self,
key: K,
count: Option<(i64, bool)>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrandmember<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = FredResult<R>> + Send
When called with just the key argument, return a random element from the sorted set value stored at
key. Read moreSource§fn zrangestore<R, D, S, M, N>(
&self,
dest: D,
source: S,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrangestore<R, D, S, M, N>( &self, dest: D, source: S, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, ) -> impl Future<Output = FredResult<R>> + Send
This command is like ZRANGE, but stores the result in the
destination key. Read moreSource§fn zrange<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
sort: Option<ZSort>,
rev: bool,
limit: Option<Limit>,
withscores: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zrange<R, K, M, N>( &self, key: K, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, withscores: bool, ) -> impl Future<Output = FredResult<R>> + Send
Returns the specified range of elements in the sorted set stored at
key. Read moreSource§fn zrangebylex<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
limit: Option<Limit>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, limit: Option<Limit>, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn zrevrangebylex<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
limit: Option<Limit>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrevrangebylex<R, K, M, N>( &self, key: K, max: M, min: N, limit: Option<Limit>, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn zrangebyscore<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
withscores: bool,
limit: Option<Limit>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn zrevrangebyscore<R, K, M, N>(
&self,
key: K,
max: M,
min: N,
withscores: bool,
limit: Option<Limit>,
) -> impl Future<Output = FredResult<R>> + Send
fn zrevrangebyscore<R, K, M, N>( &self, key: K, max: M, min: N, withscores: bool, limit: Option<Limit>, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn zrank<R, K, V>(
&self,
key: K,
member: V,
withscore: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zrank<R, K, V>( &self, key: K, member: V, withscore: bool, ) -> impl Future<Output = FredResult<R>> + Send
Returns the rank of member in the sorted set stored at
key, with the scores ordered from low to high. Read moreSource§fn zrem<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn zrem<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Removes the specified members from the sorted set stored at
key. Non existing members are ignored. Read moreSource§fn zremrangebylex<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
) -> impl Future<Output = FredResult<R>> + Send
fn zremrangebylex<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = FredResult<R>> + Send
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 moreSource§fn zremrangebyrank<R, K>(
&self,
key: K,
start: i64,
stop: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn zremrangebyrank<R, K>( &self, key: K, start: i64, stop: i64, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn zremrangebyscore<R, K, M, N>(
&self,
key: K,
min: M,
max: N,
) -> impl Future<Output = FredResult<R>> + Send
fn zremrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn zrevrange<R, K>(
&self,
key: K,
start: i64,
stop: i64,
withscores: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zrevrange<R, K>( &self, key: K, start: i64, stop: i64, withscores: bool, ) -> impl Future<Output = FredResult<R>> + Send
Returns the specified range of elements in the sorted set stored at
key. Read moreSource§fn zrevrank<R, K, V>(
&self,
key: K,
member: V,
withscore: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zrevrank<R, K, V>( &self, key: K, member: V, withscore: bool, ) -> impl Future<Output = FredResult<R>> + Send
Returns the rank of
member in the sorted set stored at key, with the scores ordered from high to low. Read moreSource§fn zscore<R, K, V>(
&self,
key: K,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn zscore<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Source§fn zunion<R, K, W>(
&self,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
withscores: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn zunion<R, K, W>( &self, keys: K, weights: W, aggregate: Option<AggregateOptions>, withscores: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command is similar to ZUNIONSTORE, but instead of storing the resulting sorted set, it is returned to the
client. Read more
Source§fn zunionstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send,
W: Into<MultipleWeights> + Send,
fn zunionstore<R, D, K, W>(
&self,
dest: D,
keys: K,
weights: W,
aggregate: Option<AggregateOptions>,
) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send,
W: Into<MultipleWeights> + Send,
Computes the union of the sorted sets given by the specified keys, and stores the result in
destination. Read moreSource§impl StreamsInterface for Transaction
Available on crate feature i-streams only.
impl StreamsInterface for Transaction
Available on crate feature
i-streams only.Source§fn xinfo_consumers<R, K, S>(
&self,
key: K,
groupname: S,
) -> impl Future<Output = FredResult<R>> + Send
fn xinfo_consumers<R, K, S>( &self, key: K, groupname: S, ) -> impl Future<Output = FredResult<R>> + Send
This command returns the list of consumers that belong to the
groupname consumer group of the stream stored at
key. Read moreSource§fn xinfo_groups<R, K>(
&self,
key: K,
) -> impl Future<Output = FredResult<R>> + Send
fn xinfo_groups<R, K>( &self, key: K, ) -> impl Future<Output = FredResult<R>> + Send
This command returns the list of all consumers groups of the stream stored at
key. Read moreSource§fn xinfo_stream<R, K>(
&self,
key: K,
full: bool,
count: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn xinfo_stream<R, K>( &self, key: K, full: bool, count: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
This command returns information about the stream stored at
key. Read moreSource§fn xadd<R, K, C, I, F>(
&self,
key: K,
nomkstream: bool,
cap: C,
id: I,
fields: F,
) -> impl Future<Output = FredResult<R>> + Send
fn xadd<R, K, C, I, F>( &self, key: K, nomkstream: bool, cap: C, id: I, fields: F, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn xtrim<R, K, C>(
&self,
key: K,
cap: C,
) -> impl Future<Output = FredResult<R>> + Send
fn xtrim<R, K, C>( &self, key: K, cap: C, ) -> impl Future<Output = FredResult<R>> + Send
Trims the stream by evicting older entries (entries with lower IDs) if needed. Read more
Source§fn xdel<R, K, S>(
&self,
key: K,
ids: S,
) -> impl Future<Output = FredResult<R>> + Send
fn xdel<R, K, S>( &self, key: K, ids: S, ) -> impl Future<Output = FredResult<R>> + Send
Removes the specified entries from a stream, and returns the number of entries deleted. Read more
Source§fn xrange_values<Ri, Rk, Rv, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>,
) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
fn xrange_values<Ri, Rk, Rv, K, S, E>( &self, key: K, start: S, end: E, count: Option<u64>, ) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
Return the stream entries matching the provided range of IDs, automatically converting to a less verbose type
definition. Read more
Source§fn xrange<R, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn xrange<R, K, S, E>( &self, key: K, start: S, end: E, count: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn xrevrange_values<Ri, Rk, Rv, K, E, S>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>,
) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
fn xrevrange_values<Ri, Rk, Rv, K, E, S>( &self, key: K, end: E, start: S, count: Option<u64>, ) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
Similar to
XRANGE, but with the results returned in reverse order. The results will be automatically converted
to a less verbose type definition. Read moreSource§fn xrevrange<R, K, S, E>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn xrevrange<R, K, S, E>( &self, key: K, end: E, start: S, count: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
Similar to
XRANGE, but with the results returned in reverse order. Read moreSource§fn xlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn xlen<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the number of entries inside a stream. Read more
Source§fn xread_map<Rk1, Rk2, Rk3, Rv, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I,
) -> impl Future<Output = FredResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>> + Send
fn xread_map<Rk1, Rk2, Rk3, Rv, K, I>( &self, count: Option<u64>, block: Option<u64>, keys: K, ids: I, ) -> impl Future<Output = FredResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>> + Send
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
Source§fn xread<R, K, I>(
&self,
count: Option<u64>,
block: Option<u64>,
keys: K,
ids: I,
) -> impl Future<Output = FredResult<R>> + Send
fn xread<R, K, I>( &self, count: Option<u64>, block: Option<u64>, keys: K, ids: I, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§fn xgroup_create<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I,
mkstream: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn xgroup_create<R, K, S, I>( &self, key: K, groupname: S, id: I, mkstream: bool, ) -> impl Future<Output = FredResult<R>> + Send
This command creates a new consumer group uniquely identified by
groupname for the stream stored at key. Read moreSource§fn xgroup_createconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C,
) -> impl Future<Output = FredResult<R>> + Send
fn xgroup_createconsumer<R, K, G, C>( &self, key: K, groupname: G, consumername: C, ) -> impl Future<Output = FredResult<R>> + Send
Create a consumer named
consumername in the consumer group groupname of the stream that’s stored at key. Read moreSource§fn xgroup_delconsumer<R, K, G, C>(
&self,
key: K,
groupname: G,
consumername: C,
) -> impl Future<Output = FredResult<R>> + Send
fn xgroup_delconsumer<R, K, G, C>( &self, key: K, groupname: G, consumername: C, ) -> impl Future<Output = FredResult<R>> + Send
Delete a consumer named
consumername in the consumer group groupname of the stream that’s stored at key. Read moreSource§fn xgroup_destroy<R, K, S>(
&self,
key: K,
groupname: S,
) -> impl Future<Output = FredResult<R>> + Send
fn xgroup_destroy<R, K, S>( &self, key: K, groupname: S, ) -> impl Future<Output = FredResult<R>> + Send
Completely destroy a consumer group. Read more
Source§fn xgroup_setid<R, K, S, I>(
&self,
key: K,
groupname: S,
id: I,
) -> impl Future<Output = FredResult<R>> + Send
fn xgroup_setid<R, K, S, I>( &self, key: K, groupname: S, id: I, ) -> impl Future<Output = FredResult<R>> + Send
Set the last delivered ID for a consumer group. Read more
Source§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,
) -> impl Future<Output = FredResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>> + Send
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, ) -> impl Future<Output = FredResult<XReadResponse<Rk1, Rk2, Rk3, Rv>>> + Send
A special version of the
XREAD command with support for consumer groups. Read moreSource§fn xreadgroup<R, G, C, K, I>(
&self,
group: G,
consumer: C,
count: Option<u64>,
block: Option<u64>,
noack: bool,
keys: K,
ids: I,
) -> impl Future<Output = FredResult<R>> + Send
fn xreadgroup<R, G, C, K, I>( &self, group: G, consumer: C, count: Option<u64>, block: Option<u64>, noack: bool, keys: K, ids: I, ) -> impl Future<Output = FredResult<R>> + Send
A special version of the
XREAD command with support for consumer groups. Read moreSource§fn xack<R, K, G, I>(
&self,
key: K,
group: G,
ids: I,
) -> impl Future<Output = FredResult<R>> + Send
fn xack<R, K, G, I>( &self, key: K, group: G, ids: I, ) -> impl Future<Output = FredResult<R>> + Send
Remove one or more messages from the Pending Entries List (PEL) of a stream consumer group. Read more
Source§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,
) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
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, ) -> impl Future<Output = FredResult<Vec<XReadValue<Ri, Rk, Rv>>>> + Send
A variation of xclaim with a less verbose return type.
Source§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,
) -> impl Future<Output = FredResult<R>> + Send
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, ) -> impl Future<Output = FredResult<R>> + Send
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
Source§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,
) -> impl Future<Output = FredResult<(String, Vec<XReadValue<Ri, Rk, Rv>>)>> + Send
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, ) -> impl Future<Output = FredResult<(String, Vec<XReadValue<Ri, Rk, Rv>>)>> + Send
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
Source§impl TimeSeriesInterface for Transaction
Available on crate feature i-time-series only.
impl TimeSeriesInterface for Transaction
Available on crate feature
i-time-series only.Source§fn ts_add<R, K, T, L>(
&self,
key: K,
timestamp: T,
value: f64,
retention: Option<u64>,
encoding: Option<Encoding>,
chunk_size: Option<u64>,
on_duplicate: Option<DuplicatePolicy>,
labels: L,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_add<R, K, T, L>( &self, key: K, timestamp: T, value: f64, retention: Option<u64>, encoding: Option<Encoding>, chunk_size: Option<u64>, on_duplicate: Option<DuplicatePolicy>, labels: L, ) -> impl Future<Output = FredResult<R>> + Send
Append a sample to a time series. Read more
Source§fn ts_alter<R, K, L>(
&self,
key: K,
retention: Option<u64>,
chunk_size: Option<u64>,
duplicate_policy: Option<DuplicatePolicy>,
labels: L,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_alter<R, K, L>( &self, key: K, retention: Option<u64>, chunk_size: Option<u64>, duplicate_policy: Option<DuplicatePolicy>, labels: L, ) -> impl Future<Output = FredResult<R>> + Send
Update the retention, chunk size, duplicate policy, and labels of an existing time series. Read more
Source§fn ts_create<R, K, L>(
&self,
key: K,
retention: Option<u64>,
encoding: Option<Encoding>,
chunk_size: Option<u64>,
duplicate_policy: Option<DuplicatePolicy>,
labels: L,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_create<R, K, L>( &self, key: K, retention: Option<u64>, encoding: Option<Encoding>, chunk_size: Option<u64>, duplicate_policy: Option<DuplicatePolicy>, labels: L, ) -> impl Future<Output = FredResult<R>> + Send
Create a new time series. Read more
Source§fn ts_createrule<R, S, D>(
&self,
src: S,
dest: D,
aggregation: (Aggregator, u64),
align_timestamp: Option<u64>,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_createrule<R, S, D>( &self, src: S, dest: D, aggregation: (Aggregator, u64), align_timestamp: Option<u64>, ) -> impl Future<Output = FredResult<R>> + Send
Create a compaction rule. Read more
Source§fn ts_decrby<R, K, L>(
&self,
key: K,
subtrahend: f64,
timestamp: Option<Timestamp>,
retention: Option<u64>,
uncompressed: bool,
chunk_size: Option<u64>,
labels: L,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_decrby<R, K, L>( &self, key: K, subtrahend: f64, timestamp: Option<Timestamp>, retention: Option<u64>, uncompressed: bool, chunk_size: Option<u64>, labels: L, ) -> impl Future<Output = FredResult<R>> + Send
Decrease the value of the sample with the maximum existing timestamp, or create a new sample with a value equal
to the value of the sample with the maximum existing timestamp with a given decrement. Read more
Source§fn ts_del<R, K>(
&self,
key: K,
from: i64,
to: i64,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_del<R, K>( &self, key: K, from: i64, to: i64, ) -> impl Future<Output = FredResult<R>> + Send
Delete all samples between two timestamps for a given time series. Read more
Source§fn ts_deleterule<R, S, D>(
&self,
src: S,
dest: D,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_deleterule<R, S, D>( &self, src: S, dest: D, ) -> impl Future<Output = FredResult<R>> + Send
Delete a compaction rule. Read more
Source§fn ts_get<R, K>(
&self,
key: K,
latest: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_get<R, K>( &self, key: K, latest: bool, ) -> impl Future<Output = FredResult<R>> + Send
Get the sample with the highest timestamp from a given time series. Read more
Source§fn ts_incrby<R, K, L>(
&self,
key: K,
addend: f64,
timestamp: Option<Timestamp>,
retention: Option<u64>,
uncompressed: bool,
chunk_size: Option<u64>,
labels: L,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_incrby<R, K, L>( &self, key: K, addend: f64, timestamp: Option<Timestamp>, retention: Option<u64>, uncompressed: bool, chunk_size: Option<u64>, labels: L, ) -> impl Future<Output = FredResult<R>> + Send
Increase the value of the sample with the maximum existing timestamp, or create a new sample with a value equal
to the value of the sample with the maximum existing timestamp with a given increment. Read more
Source§fn ts_info<R, K>(
&self,
key: K,
debug: bool,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_info<R, K>( &self, key: K, debug: bool, ) -> impl Future<Output = FredResult<R>> + Send
Return information and statistics for a time series. Read more
Source§fn ts_madd<R, K, I>(
&self,
samples: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_madd<R, K, I>( &self, samples: I, ) -> impl Future<Output = FredResult<R>> + Send
Append new samples to one or more time series. Read more
Source§fn ts_mget<R, L, S, I>(
&self,
latest: bool,
labels: Option<L>,
filters: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_mget<R, L, S, I>( &self, latest: bool, labels: Option<L>, filters: I, ) -> impl Future<Output = FredResult<R>> + Send
Get the sample with the highest timestamp from each time series matching a specific filter. Read more
Source§fn ts_mrange<R, F, T, I, S, J>(
&self,
from: F,
to: T,
latest: bool,
filter_by_ts: I,
filter_by_value: Option<(i64, i64)>,
labels: Option<GetLabels>,
count: Option<u64>,
aggregation: Option<RangeAggregation>,
filters: J,
group_by: Option<GroupBy>,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_mrange<R, F, T, I, S, J>( &self, from: F, to: T, latest: bool, filter_by_ts: I, filter_by_value: Option<(i64, i64)>, labels: Option<GetLabels>, count: Option<u64>, aggregation: Option<RangeAggregation>, filters: J, group_by: Option<GroupBy>, ) -> impl Future<Output = FredResult<R>> + Send
Query a range across multiple time series by filters in the forward direction. Read more
Source§fn ts_mrevrange<R, F, T, I, S, J>(
&self,
from: F,
to: T,
latest: bool,
filter_by_ts: I,
filter_by_value: Option<(i64, i64)>,
labels: Option<GetLabels>,
count: Option<u64>,
aggregation: Option<RangeAggregation>,
filters: J,
group_by: Option<GroupBy>,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_mrevrange<R, F, T, I, S, J>( &self, from: F, to: T, latest: bool, filter_by_ts: I, filter_by_value: Option<(i64, i64)>, labels: Option<GetLabels>, count: Option<u64>, aggregation: Option<RangeAggregation>, filters: J, group_by: Option<GroupBy>, ) -> impl Future<Output = FredResult<R>> + Send
Query a range across multiple time series by filters in the reverse direction. Read more
Source§fn ts_queryindex<R, S, I>(
&self,
filters: I,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_queryindex<R, S, I>( &self, filters: I, ) -> impl Future<Output = FredResult<R>> + Send
Get all time series keys matching a filter list. Read more
Source§fn ts_range<R, K, F, T, I>(
&self,
key: K,
from: F,
to: T,
latest: bool,
filter_by_ts: I,
filter_by_value: Option<(i64, i64)>,
count: Option<u64>,
aggregation: Option<RangeAggregation>,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_range<R, K, F, T, I>( &self, key: K, from: F, to: T, latest: bool, filter_by_ts: I, filter_by_value: Option<(i64, i64)>, count: Option<u64>, aggregation: Option<RangeAggregation>, ) -> impl Future<Output = FredResult<R>> + Send
Query a range in forward direction. Read more
Source§fn ts_revrange<R, K, F, T, I>(
&self,
key: K,
from: F,
to: T,
latest: bool,
filter_by_ts: I,
filter_by_value: Option<(i64, i64)>,
count: Option<u64>,
aggregation: Option<RangeAggregation>,
) -> impl Future<Output = FredResult<R>> + Send
fn ts_revrange<R, K, F, T, I>( &self, key: K, from: F, to: T, latest: bool, filter_by_ts: I, filter_by_value: Option<(i64, i64)>, count: Option<u64>, aggregation: Option<RangeAggregation>, ) -> impl Future<Output = FredResult<R>> + Send
Query a range in reverse direction. Read more
impl Eq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more