pub trait ServerCommands<'a> {
Show 53 methods
// Provided methods
fn acl_cat<C, CC>(
self,
options: AclCatOptions,
) -> PreparedCommand<'a, Self, CC>
where Self: Sized,
C: PrimitiveResponse + DeserializeOwned,
CC: CollectionResponse<C> { ... }
fn acl_deluser<U, UU>(
self,
usernames: UU,
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
U: SingleArg,
UU: SingleArgCollection<U> { ... }
fn acl_dryrun<U, C, R>(
self,
username: U,
command: C,
options: AclDryRunOptions,
) -> PreparedCommand<'a, Self, R>
where Self: Sized,
U: SingleArg,
C: SingleArg,
R: PrimitiveResponse { ... }
fn acl_genpass<R: PrimitiveResponse>(
self,
options: AclGenPassOptions,
) -> PreparedCommand<'a, Self, R>
where Self: Sized { ... }
fn acl_getuser<U, RR>(self, username: U) -> PreparedCommand<'a, Self, RR>
where Self: Sized,
U: SingleArg,
RR: KeyValueCollectionResponse<String, Value> { ... }
fn acl_list(self) -> PreparedCommand<'a, Self, Vec<String>>
where Self: Sized { ... }
fn acl_load(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn acl_log<EE>(
self,
options: AclLogOptions,
) -> PreparedCommand<'a, Self, Vec<EE>>
where Self: Sized,
EE: KeyValueCollectionResponse<String, Value> + DeserializeOwned { ... }
fn acl_save(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn acl_setuser<U, R, RR>(
self,
username: U,
rules: RR,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
U: SingleArg,
R: SingleArg,
RR: SingleArgCollection<R> { ... }
fn acl_users<U, UU>(self) -> PreparedCommand<'a, Self, UU>
where Self: Sized,
U: PrimitiveResponse + DeserializeOwned,
UU: CollectionResponse<U> { ... }
fn acl_whoami<U: PrimitiveResponse>(self) -> PreparedCommand<'a, Self, U>
where Self: Sized { ... }
fn command(self) -> PreparedCommand<'a, Self, Vec<CommandInfo>>
where Self: Sized { ... }
fn command_count(self) -> PreparedCommand<'a, Self, usize>
where Self: Sized { ... }
fn command_docs<N, NN, DD>(
self,
command_names: NN,
) -> PreparedCommand<'a, Self, DD>
where Self: Sized,
N: SingleArg,
NN: SingleArgCollection<N>,
DD: KeyValueCollectionResponse<String, CommandDoc> { ... }
fn command_getkeys<A, AA, KK>(
self,
args: AA,
) -> PreparedCommand<'a, Self, KK>
where Self: Sized,
A: SingleArg,
AA: SingleArgCollection<A>,
KK: CollectionResponse<String> { ... }
fn command_getkeysandflags<A, AA, KK>(
self,
args: AA,
) -> PreparedCommand<'a, Self, KK>
where Self: Sized,
A: SingleArg,
AA: SingleArgCollection<A>,
KK: KeyValueCollectionResponse<String, Vec<String>> { ... }
fn command_info<N, NN>(
self,
command_names: NN,
) -> PreparedCommand<'a, Self, Vec<CommandInfo>>
where Self: Sized,
N: SingleArg,
NN: SingleArgCollection<N> { ... }
fn command_list<CC>(
self,
options: CommandListOptions,
) -> PreparedCommand<'a, Self, CC>
where Self: Sized,
CC: CollectionResponse<String> { ... }
fn config_get<P, PP, V, VV>(
self,
params: PP,
) -> PreparedCommand<'a, Self, VV>
where Self: Sized,
P: SingleArg,
PP: SingleArgCollection<P>,
V: PrimitiveResponse,
VV: KeyValueCollectionResponse<String, V> { ... }
fn config_resetstat(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn config_rewrite(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn config_set<P, V, C>(self, configs: C) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
P: SingleArg,
V: SingleArg,
C: KeyValueArgsCollection<P, V> { ... }
fn dbsize(self) -> PreparedCommand<'a, Self, usize>
where Self: Sized { ... }
fn failover(self, options: FailOverOptions) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn flushdb(
self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn flushall(
self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn info<SS>(self, sections: SS) -> PreparedCommand<'a, Self, String>
where Self: Sized,
SS: SingleArgCollection<InfoSection> { ... }
fn lastsave(self) -> PreparedCommand<'a, Self, u64>
where Self: Sized { ... }
fn latency_doctor(self) -> PreparedCommand<'a, Self, String>
where Self: Sized { ... }
fn latency_graph(
self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'a, Self, String>
where Self: Sized { ... }
fn latency_histogram<C, CC, RR>(
self,
commands: CC,
) -> PreparedCommand<'a, Self, RR>
where Self: Sized,
C: SingleArg,
CC: SingleArgCollection<C>,
RR: KeyValueCollectionResponse<String, CommandHistogram> { ... }
fn latency_history<RR>(
self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'a, Self, RR>
where Self: Sized,
RR: CollectionResponse<(u32, u32)> { ... }
fn latency_latest<RR>(self) -> PreparedCommand<'a, Self, RR>
where Self: Sized,
RR: CollectionResponse<(String, u32, u32, u32)> { ... }
fn latency_reset<EE>(self, events: EE) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
EE: SingleArgCollection<LatencyHistoryEvent> { ... }
fn lolwut(self, options: LolWutOptions) -> PreparedCommand<'a, Self, String>
where Self: Sized { ... }
fn memory_doctor(self) -> PreparedCommand<'a, Self, String>
where Self: Sized { ... }
fn memory_malloc_stats(self) -> PreparedCommand<'a, Self, String>
where Self: Sized { ... }
fn memory_purge(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn memory_stats(self) -> PreparedCommand<'a, Self, MemoryStats>
where Self: Sized { ... }
fn memory_usage<K>(
self,
key: K,
options: MemoryUsageOptions,
) -> PreparedCommand<'a, Self, Option<usize>>
where Self: Sized,
K: SingleArg { ... }
fn module_list<MM>(self) -> PreparedCommand<'a, Self, MM>
where Self: Sized,
MM: CollectionResponse<ModuleInfo> { ... }
fn module_load<P>(
self,
path: P,
options: ModuleLoadOptions,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
P: SingleArg { ... }
fn module_unload<N>(self, name: N) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
N: SingleArg { ... }
fn replicaof(
self,
options: ReplicaOfOptions,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn role(self) -> PreparedCommand<'a, Self, RoleResult>
where Self: Sized { ... }
fn save(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn shutdown(self, options: ShutdownOptions) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn slowlog_get(
self,
options: SlowLogOptions,
) -> PreparedCommand<'a, Self, Vec<SlowLogEntry>>
where Self: Sized { ... }
fn slowlog_len(self) -> PreparedCommand<'a, Self, usize>
where Self: Sized { ... }
fn slowlog_reset(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn swapdb(
self,
index1: usize,
index2: usize,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn time(self) -> PreparedCommand<'a, Self, (u32, u32)>
where Self: Sized { ... }
}
Expand description
A group of Redis commands related to Server Management
§See Also
Provided Methods§
Sourcefn acl_cat<C, CC>(self, options: AclCatOptions) -> PreparedCommand<'a, Self, CC>
fn acl_cat<C, CC>(self, options: AclCatOptions) -> PreparedCommand<'a, Self, CC>
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.
§Return
A collection of ACL categories or a collection of commands inside a given category.
§Errors
The command may return an error if an invalid category name is given as argument.
§See Also
Sourcefn acl_deluser<U, UU>(self, usernames: UU) -> PreparedCommand<'a, Self, usize>
fn acl_deluser<U, UU>(self, usernames: UU) -> PreparedCommand<'a, Self, usize>
Sourcefn acl_dryrun<U, C, R>(
self,
username: U,
command: C,
options: AclDryRunOptions,
) -> PreparedCommand<'a, Self, R>
fn acl_dryrun<U, C, R>( self, username: U, command: C, options: AclDryRunOptions, ) -> PreparedCommand<'a, Self, R>
Sourcefn acl_genpass<R: PrimitiveResponse>(
self,
options: AclGenPassOptions,
) -> PreparedCommand<'a, Self, R>where
Self: Sized,
fn acl_genpass<R: PrimitiveResponse>(
self,
options: AclGenPassOptions,
) -> PreparedCommand<'a, Self, R>where
Self: Sized,
Generates a password starting from /dev/urandom if available, otherwise (in systems without /dev/urandom) it uses a weaker system that is likely still better than picking a weak password by hand.
§Return
by default 64 bytes string representing 256 bits of pseudorandom data. Otherwise if an argument if needed, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4.
§See Also
Sourcefn acl_getuser<U, RR>(self, username: U) -> PreparedCommand<'a, Self, RR>
fn acl_getuser<U, RR>(self, username: U) -> PreparedCommand<'a, Self, RR>
Sourcefn acl_list(self) -> PreparedCommand<'a, Self, Vec<String>>where
Self: Sized,
fn acl_list(self) -> PreparedCommand<'a, Self, Vec<String>>where
Self: Sized,
Sourcefn acl_load(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn acl_load(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
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.
§Return
An array of strings. Each line in the returned array defines a different user, and the format is the same used in the redis.conf file or the external ACL file
§Errors
The command may fail with an error for several reasons:
- if the file is not readable,
- if there is an error inside the file, and in such case the error will be reported to the user in the error.
- Finally the command will fail if the server is not configured to use an external ACL file.
§See Also
Sourcefn acl_log<EE>(
self,
options: AclLogOptions,
) -> PreparedCommand<'a, Self, Vec<EE>>
fn acl_log<EE>( self, options: AclLogOptions, ) -> PreparedCommand<'a, Self, Vec<EE>>
Sourcefn acl_save(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn acl_save(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
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.
§Errors
The command may fail with an error for several reasons:
- if the file cannot be written
- if the server is not configured to use an external ACL file.
§See Also
Sourcefn acl_setuser<U, R, RR>(
self,
username: U,
rules: RR,
) -> PreparedCommand<'a, Self, ()>
fn acl_setuser<U, R, RR>( self, username: U, rules: RR, ) -> PreparedCommand<'a, Self, ()>
Sourcefn acl_users<U, UU>(self) -> PreparedCommand<'a, Self, UU>
fn acl_users<U, UU>(self) -> PreparedCommand<'a, Self, UU>
Sourcefn acl_whoami<U: PrimitiveResponse>(self) -> PreparedCommand<'a, Self, U>where
Self: Sized,
fn acl_whoami<U: PrimitiveResponse>(self) -> PreparedCommand<'a, Self, U>where
Self: Sized,
Sourcefn command(self) -> PreparedCommand<'a, Self, Vec<CommandInfo>>where
Self: Sized,
fn command(self) -> PreparedCommand<'a, Self, Vec<CommandInfo>>where
Self: Sized,
Sourcefn command_count(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
fn command_count(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
Sourcefn command_docs<N, NN, DD>(
self,
command_names: NN,
) -> PreparedCommand<'a, Self, DD>where
Self: Sized,
N: SingleArg,
NN: SingleArgCollection<N>,
DD: KeyValueCollectionResponse<String, CommandDoc>,
fn command_docs<N, NN, DD>(
self,
command_names: NN,
) -> PreparedCommand<'a, Self, DD>where
Self: Sized,
N: SingleArg,
NN: SingleArgCollection<N>,
DD: KeyValueCollectionResponse<String, CommandDoc>,
Sourcefn command_getkeys<A, AA, KK>(self, args: AA) -> PreparedCommand<'a, Self, KK>
fn command_getkeys<A, AA, KK>(self, args: AA) -> PreparedCommand<'a, Self, KK>
Sourcefn command_getkeysandflags<A, AA, KK>(
self,
args: AA,
) -> PreparedCommand<'a, Self, KK>where
Self: Sized,
A: SingleArg,
AA: SingleArgCollection<A>,
KK: KeyValueCollectionResponse<String, Vec<String>>,
fn command_getkeysandflags<A, AA, KK>(
self,
args: AA,
) -> PreparedCommand<'a, Self, KK>where
Self: Sized,
A: SingleArg,
AA: SingleArgCollection<A>,
KK: KeyValueCollectionResponse<String, Vec<String>>,
Sourcefn command_info<N, NN>(
self,
command_names: NN,
) -> PreparedCommand<'a, Self, Vec<CommandInfo>>
fn command_info<N, NN>( self, command_names: NN, ) -> PreparedCommand<'a, Self, Vec<CommandInfo>>
Sourcefn command_list<CC>(
self,
options: CommandListOptions,
) -> PreparedCommand<'a, Self, CC>
fn command_list<CC>( self, options: CommandListOptions, ) -> PreparedCommand<'a, Self, CC>
Sourcefn config_get<P, PP, V, VV>(self, params: PP) -> PreparedCommand<'a, Self, VV>where
Self: Sized,
P: SingleArg,
PP: SingleArgCollection<P>,
V: PrimitiveResponse,
VV: KeyValueCollectionResponse<String, V>,
fn config_get<P, PP, V, VV>(self, params: PP) -> PreparedCommand<'a, Self, VV>where
Self: Sized,
P: SingleArg,
PP: SingleArgCollection<P>,
V: PrimitiveResponse,
VV: KeyValueCollectionResponse<String, V>,
Used to read the configuration parameters of a running Redis server.
For every key that does not hold a string value or does not exist, the special value nil is returned. Because of this, the operation never fails.
§Return
Array reply: collection of the requested params with their matching values.
§See Also
Sourcefn config_resetstat(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn config_resetstat(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
Sourcefn config_rewrite(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn config_rewrite(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
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.
§See Also
Sourcefn config_set<P, V, C>(self, configs: C) -> PreparedCommand<'a, Self, ()>
fn config_set<P, V, C>(self, configs: C) -> PreparedCommand<'a, Self, ()>
Used in order to reconfigure the server at run time without the need to restart Redis.
§See Also
Sourcefn dbsize(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
fn dbsize(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
Return the number of keys in the currently-selected database.
§See Also
Sourcefn failover(self, options: FailOverOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn failover(self, options: FailOverOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command will start a coordinated failover between the currently-connected-to master and one of its replicas.
§See Also
Sourcefn flushdb(self, flushing_mode: FlushingMode) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn flushdb(self, flushing_mode: FlushingMode) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
Sourcefn flushall(self, flushing_mode: FlushingMode) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn flushall(self, flushing_mode: FlushingMode) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
Delete all the keys of all the existing databases, not just the currently selected one.
§See Also
Sourcefn info<SS>(self, sections: SS) -> PreparedCommand<'a, Self, String>
fn info<SS>(self, sections: SS) -> PreparedCommand<'a, Self, String>
This command returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans.
§See Also
Sourcefn lastsave(self) -> PreparedCommand<'a, Self, u64>where
Self: Sized,
fn lastsave(self) -> PreparedCommand<'a, Self, u64>where
Self: Sized,
Return the UNIX TIME of the last DB save executed with success.
§See Also
Sourcefn latency_doctor(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
fn latency_doctor(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
Sourcefn latency_graph(
self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'a, Self, String>where
Self: Sized,
fn latency_graph(
self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'a, Self, String>where
Self: Sized,
Sourcefn latency_histogram<C, CC, RR>(
self,
commands: CC,
) -> PreparedCommand<'a, Self, RR>where
Self: Sized,
C: SingleArg,
CC: SingleArgCollection<C>,
RR: KeyValueCollectionResponse<String, CommandHistogram>,
fn latency_histogram<C, CC, RR>(
self,
commands: CC,
) -> PreparedCommand<'a, Self, RR>where
Self: Sized,
C: SingleArg,
CC: SingleArgCollection<C>,
RR: KeyValueCollectionResponse<String, CommandHistogram>,
Sourcefn latency_history<RR>(
self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'a, Self, RR>
fn latency_history<RR>( self, event: LatencyHistoryEvent, ) -> PreparedCommand<'a, Self, RR>
Sourcefn latency_latest<RR>(self) -> PreparedCommand<'a, Self, RR>
fn latency_latest<RR>(self) -> PreparedCommand<'a, Self, RR>
This command reports the latest latency events logged.
§Return
A collection of the latest latency events logged. Each reported event has the following fields:
- Event name.
- Unix timestamp of the latest latency spike for the event.
- Latest event latency in millisecond.
- All-time maximum latency for this event.
“All-time” means the maximum latency since the Redis instance was started,
or the time that events were reset
.
§See Also
Sourcefn latency_reset<EE>(self, events: EE) -> PreparedCommand<'a, Self, usize>
fn latency_reset<EE>(self, events: EE) -> PreparedCommand<'a, Self, usize>
Sourcefn lolwut(self, options: LolWutOptions) -> PreparedCommand<'a, Self, String>where
Self: Sized,
fn lolwut(self, options: LolWutOptions) -> PreparedCommand<'a, Self, String>where
Self: Sized,
Sourcefn memory_doctor(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
fn memory_doctor(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
Sourcefn memory_malloc_stats(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
fn memory_malloc_stats(self) -> PreparedCommand<'a, Self, String>where
Self: Sized,
Sourcefn memory_purge(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn memory_purge(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command attempts to purge dirty pages so these can be reclaimed by the allocator.
§See Also
Sourcefn memory_stats(self) -> PreparedCommand<'a, Self, MemoryStats>where
Self: Sized,
fn memory_stats(self) -> PreparedCommand<'a, Self, MemoryStats>where
Self: Sized,
Sourcefn memory_usage<K>(
self,
key: K,
options: MemoryUsageOptions,
) -> PreparedCommand<'a, Self, Option<usize>>
fn memory_usage<K>( self, key: K, options: MemoryUsageOptions, ) -> PreparedCommand<'a, Self, Option<usize>>
Sourcefn module_list<MM>(self) -> PreparedCommand<'a, Self, MM>
fn module_list<MM>(self) -> PreparedCommand<'a, Self, MM>
Returns information about the modules loaded to the server.
§Return
list of loaded modules.
Each element in the list represents a module as an instance of ModuleInfo
§See Also
Sourcefn module_load<P>(
self,
path: P,
options: ModuleLoadOptions,
) -> PreparedCommand<'a, Self, ()>
fn module_load<P>( self, path: P, options: ModuleLoadOptions, ) -> PreparedCommand<'a, Self, ()>
Sourcefn module_unload<N>(self, name: N) -> PreparedCommand<'a, Self, ()>
fn module_unload<N>(self, name: N) -> PreparedCommand<'a, Self, ()>
Sourcefn replicaof(self, options: ReplicaOfOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn replicaof(self, options: ReplicaOfOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command can change the replication settings of a replica on the fly.
§See Also
Sourcefn role(self) -> PreparedCommand<'a, Self, RoleResult>where
Self: Sized,
fn role(self) -> PreparedCommand<'a, Self, RoleResult>where
Self: Sized,
Provide information on the role of a Redis instance in the context of replication,
by returning if the instance is currently a master
, slave
, or sentinel
.
§See Also
Sourcefn save(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn save(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command performs a synchronous save of the dataset producing a point in time snapshot of all the data inside the Redis instance, in the form of an RDB file.
§See Also
Sourcefn shutdown(self, options: ShutdownOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn shutdown(self, options: ShutdownOptions) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
Sourcefn slowlog_get(
self,
options: SlowLogOptions,
) -> PreparedCommand<'a, Self, Vec<SlowLogEntry>>where
Self: Sized,
fn slowlog_get(
self,
options: SlowLogOptions,
) -> PreparedCommand<'a, Self, Vec<SlowLogEntry>>where
Self: Sized,
This command returns entries from the slow log in chronological order.
§See Also
Sourcefn slowlog_len(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
fn slowlog_len(self) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
This command returns the current number of entries in the slow log.
§See Also
Sourcefn slowlog_reset(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn slowlog_reset(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command resets the slow log, clearing all entries in it.
§See Also
Sourcefn swapdb(self, index1: usize, index2: usize) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn swapdb(self, index1: usize, index2: usize) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
This command swaps two Redis databases, so that immediately all the clients connected to a given database will see the data of the other database, and the other way around.