pub trait ServerCommands {
Show 53 methods fn acl_cat<C, CC>(
        &mut self,
        options: AclCatOptions
    ) -> PreparedCommand<'_, Self, CC>
    where
        Self: Sized,
        C: FromValue,
        CC: FromSingleValueArray<C>
, { ... } fn acl_deluser<U, UU>(
        &mut self,
        usernames: UU
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        U: Into<BulkString>,
        UU: SingleArgOrCollection<U>
, { ... } fn acl_dryrun<U, C, R>(
        &mut self,
        username: U,
        command: C,
        options: AclDryRunOptions
    ) -> PreparedCommand<'_, Self, R>
    where
        Self: Sized,
        U: Into<BulkString>,
        C: Into<BulkString>,
        R: FromValue
, { ... } fn acl_genpass<R: FromValue>(
        &mut self,
        options: AclGenPassOptions
    ) -> PreparedCommand<'_, Self, R>
    where
        Self: Sized
, { ... } fn acl_getuser<U, RR>(
        &mut self,
        username: U
    ) -> PreparedCommand<'_, Self, RR>
    where
        Self: Sized,
        U: Into<BulkString>,
        RR: FromKeyValueValueArray<String, Value>
, { ... } fn acl_list(&mut self) -> PreparedCommand<'_, Self, Vec<String>>
    where
        Self: Sized
, { ... } fn acl_load(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn acl_log<EE>(
        &mut self,
        options: AclLogOptions
    ) -> PreparedCommand<'_, Self, Vec<EE>>
    where
        Self: Sized,
        EE: FromKeyValueValueArray<String, Value>
, { ... } fn acl_save(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn acl_setuser<U, R, RR>(
        &mut self,
        username: U,
        rules: RR
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        U: Into<BulkString>,
        R: Into<BulkString>,
        RR: SingleArgOrCollection<R>
, { ... } fn acl_users<U, UU>(&mut self) -> PreparedCommand<'_, Self, UU>
    where
        Self: Sized,
        U: FromValue,
        UU: FromSingleValueArray<U>
, { ... } fn acl_whoami<U: FromValue>(&mut self) -> PreparedCommand<'_, Self, U>
    where
        Self: Sized
, { ... } fn command(&mut self) -> PreparedCommand<'_, Self, Vec<CommandInfo>>
    where
        Self: Sized
, { ... } fn command_count(&mut self) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized
, { ... } fn command_docs<N, NN, DD>(
        &mut self,
        command_names: NN
    ) -> PreparedCommand<'_, Self, DD>
    where
        Self: Sized,
        N: Into<BulkString>,
        NN: SingleArgOrCollection<N>,
        DD: FromKeyValueValueArray<String, CommandDoc>
, { ... } fn command_getkeys<A, AA, KK>(
        &mut self,
        args: AA
    ) -> PreparedCommand<'_, Self, KK>
    where
        Self: Sized,
        A: Into<BulkString>,
        AA: SingleArgOrCollection<A>,
        KK: FromSingleValueArray<String>
, { ... } fn command_getkeysandflags<A, AA, KK>(
        &mut self,
        args: AA
    ) -> PreparedCommand<'_, Self, KK>
    where
        Self: Sized,
        A: Into<BulkString>,
        AA: SingleArgOrCollection<A>,
        KK: FromKeyValueValueArray<String, Vec<String>>
, { ... } fn command_info<N, NN>(
        &mut self,
        command_names: NN
    ) -> PreparedCommand<'_, Self, Vec<CommandInfo>>
    where
        Self: Sized,
        N: Into<BulkString>,
        NN: SingleArgOrCollection<N>
, { ... } fn command_list<CC>(
        &mut self,
        options: CommandListOptions
    ) -> PreparedCommand<'_, Self, CC>
    where
        Self: Sized,
        CC: FromSingleValueArray<String>
, { ... } fn config_get<P, PP, V, VV>(
        &mut self,
        params: PP
    ) -> PreparedCommand<'_, Self, VV>
    where
        Self: Sized,
        P: Into<BulkString>,
        PP: SingleArgOrCollection<P>,
        V: FromValue,
        VV: FromKeyValueValueArray<String, V>
, { ... } fn config_resetstat(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn config_rewrite(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn config_set<P, V, C>(
        &mut self,
        configs: C
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        P: Into<BulkString>,
        V: Into<BulkString>,
        C: KeyValueArgOrCollection<P, V>
, { ... } fn dbsize(&mut self) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized
, { ... } fn failover(
        &mut self,
        options: FailOverOptions
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn flushdb(
        &mut self,
        flushing_mode: FlushingMode
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn flushall(
        &mut self,
        flushing_mode: FlushingMode
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn info<SS>(&mut self, sections: SS) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized,
        SS: SingleArgOrCollection<InfoSection>
, { ... } fn lastsave(&mut self) -> PreparedCommand<'_, Self, u64>
    where
        Self: Sized
, { ... } fn latency_doctor(&mut self) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized
, { ... } fn latency_graph(
        &mut self,
        event: LatencyHistoryEvent
    ) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized
, { ... } fn latency_histogram<C, CC, RR>(
        &mut self,
        commands: CC
    ) -> PreparedCommand<'_, Self, RR>
    where
        Self: Sized,
        C: Into<BulkString>,
        CC: SingleArgOrCollection<C>,
        RR: FromKeyValueValueArray<String, CommandHistogram>
, { ... } fn latency_history<RR>(
        &mut self,
        event: LatencyHistoryEvent
    ) -> PreparedCommand<'_, Self, RR>
    where
        Self: Sized,
        RR: FromSingleValueArray<(u32, u32)>
, { ... } fn latency_latest<RR>(&mut self) -> PreparedCommand<'_, Self, RR>
    where
        Self: Sized,
        RR: FromSingleValueArray<(String, u32, u32, u32)>
, { ... } fn latency_reset<EE>(
        &mut self,
        events: EE
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        EE: SingleArgOrCollection<LatencyHistoryEvent>
, { ... } fn lolwut(
        &mut self,
        options: LolWutOptions
    ) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized
, { ... } fn memory_doctor(&mut self) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized
, { ... } fn memory_malloc_stats(&mut self) -> PreparedCommand<'_, Self, String>
    where
        Self: Sized
, { ... } fn memory_purge(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn memory_stats(&mut self) -> PreparedCommand<'_, Self, MemoryStats>
    where
        Self: Sized
, { ... } fn memory_usage<K>(
        &mut self,
        key: K,
        options: MemoryUsageOptions
    ) -> PreparedCommand<'_, Self, Option<usize>>
    where
        Self: Sized,
        K: Into<BulkString>
, { ... } fn module_list<MM>(&mut self) -> PreparedCommand<'_, Self, MM>
    where
        Self: Sized,
        MM: FromSingleValueArray<ModuleInfo>
, { ... } fn module_load<P>(
        &mut self,
        path: P,
        options: ModuleLoadOptions
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        P: Into<BulkString>
, { ... } fn module_unload<N>(&mut self, name: N) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        N: Into<BulkString>
, { ... } fn replicaof(
        &mut self,
        options: ReplicaOfOptions
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn role(&mut self) -> PreparedCommand<'_, Self, RoleResult>
    where
        Self: Sized
, { ... } fn save(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn shutdown(
        &mut self,
        options: ShutdownOptions
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn slowlog_get(
        &mut self,
        options: SlowLogOptions
    ) -> PreparedCommand<'_, Self, Vec<SlowLogEntry>>
    where
        Self: Sized
, { ... } fn slowlog_len(&mut self) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized
, { ... } fn slowlog_reset(&mut self) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn swapdb(
        &mut self,
        index1: usize,
        index2: usize
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized
, { ... } fn time(&mut self) -> PreparedCommand<'_, Self, (u32, u32)>
    where
        Self: Sized
, { ... }
}
Expand description

A group of Redis commands related to Server Management

See Also

Redis Server Management Commands ACL guide

Provided Methods

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

https://redis.io/commands/acl-cat/

Delete all the specified ACL users and terminate all the connections that are authenticated with such users.

Return

The number of users that were deleted. This number will not always match the number of arguments since certain users may not exist.

See Also

https://redis.io/commands/acl-deluser/

Simulate the execution of a given command by a given user.

Return

OK on success. An error describing why the user can’t execute the command.

See Also

https://redis.io/commands/acl-dryrun/

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

https://redis.io/commands/acl-genpass/

The command returns all the rules defined for an existing ACL user.

Return

A collection of ACL rule definitions for the user.

See Also

https://redis.io/commands/acl-getuser/

The command shows the currently active ACL rules in the Redis server.

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

See Also

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

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

https://redis.io/commands/acl-load/

The command shows a list of recent ACL security events

Return

A key/value collection of ACL security events. Empty collection when called with the reset option

See Also

https://redis.io/commands/acl-log/

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

https://redis.io/commands/acl-save/

Create an ACL user with the specified rules or modify the rules of an existing user.

Errors

If the rules contain errors, the error is returned.

See Also

https://redis.io/commands/acl-setuser/

The command shows a list of all the usernames of the currently configured users in the Redis ACL system.

Return

A collection of usernames

See Also

https://redis.io/commands/acl-users/

Return the username the current connection is authenticated with.

Return

The username of the current connection.

See Also

https://redis.io/commands/acl-whoami/

Return an array with details about every Redis command.

Return

A nested list of command details. The order of commands in the array is random.

See Also

https://redis.io/commands/command/

Number of total commands in this Redis server.

Return

number of commands returned by command

See Also

https://redis.io/commands/command-count/

Number of total commands in this Redis server.

Return

map key=command name, value=command doc

See Also

https://redis.io/commands/command-docs/

A helper command to let you find the keys from a full Redis command.

Return

list of keys from your command.

See Also

https://redis.io/commands/command-_getkeys/

A helper command to let you find the keys from a full Redis command together with flags indicating what each key is used for.

Return

map of keys with their flags from your command.

See Also

https://redis.io/commands/command-getkeysandflags/

Return an array with details about multiple Redis command.

Return

A nested list of command details.

See Also

https://redis.io/commands/command-info/

Return an array of the server’s command names based on optional filters

Return

an array of the server’s command names.

See Also

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

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

https://redis.io/commands/config-get/

Resets the statistics reported by Redis using the info command.

See Also

https://redis.io/commands/config-resetstat/

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

https://redis.io/commands/config-rewrite/

Used in order to reconfigure the server at run time without the need to restart Redis.

See Also

https://redis.io/commands/config-set/

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

See Also

https://redis.io/commands/dbsize/

This command will start a coordinated failover between the currently-connected-to master and one of its replicas.

See Also

https://redis.io/commands/failover/

Delete all the keys of the currently selected DB.

See Also

https://redis.io/commands/flushdb/

Delete all the keys of all the existing databases, not just the currently selected one.

See Also

https://redis.io/commands/flushall/

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

https://redis.io/commands/info/

Return the UNIX TIME of the last DB save executed with success.

See Also

https://redis.io/commands/lastsave/

This command reports about different latency-related issues and advises about possible remedies.

Return

String report

See Also

https://redis.io/commands/latency-doctor/

Produces an ASCII-art style graph for the specified event.

Return

String graph

See Also

https://redis.io/commands/latency-graph/

This command reports a cumulative distribution of latencies in the format of a histogram for each of the specified command names.

Return

The command returns a map where each key is a command name, and each value is a CommandHistogram instance.

See Also

https://redis.io/commands/latency-histogram/

This command returns the raw data of the event’s latency spikes time series.

Return

The command returns a collection where each element is a two elements tuple representing

  • the unix timestamp in seconds
  • the latency of the event in milliseconds
See Also

https://redis.io/commands/latency-history/

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

https://redis.io/commands/latency-latest/

This command resets the latency spikes time series of all, or only some, events.

Return

the number of event time series that were reset.

See Also

https://redis.io/commands/latency-latest/

The LOLWUT command displays the Redis version: however as a side effect of doing so, it also creates a piece of generative computer art that is different with each version of Redis.

Return

the string containing the generative computer art, and a text with the Redis version.

See Also

https://redis.io/commands/lolwut/

This command reports about different memory-related issues that the Redis server experiences, and advises about possible remedies.

Return

the string report.

See Also

https://redis.io/commands/memory-doctor/

This command provides an internal statistics report from the memory allocator.

Return

the memory allocator’s internal statistics report.

See Also

https://redis.io/commands/memory-malloc-stats/

This command attempts to purge dirty pages so these can be reclaimed by the allocator.

See Also

https://redis.io/commands/memory-purge/

This command returns information about the memory usage of the server.

Return

the memory allocator’s internal statistics report.

See Also

https://redis.io/commands/memory-stats/

This command reports the number of bytes that a key and its value require to be stored in RAM.

Return

the memory usage in bytes, or None when the key does not exist.

See Also

https://redis.io/commands/memory-usage/

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

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

Loads a module from a dynamic library at runtime.

See Also

https://redis.io/commands/module-load/

This command can change the replication settings of a replica on the fly.

See Also

https://redis.io/commands/replicaof/

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

https://redis.io/commands/role/

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

https://redis.io/commands/save/

This command returns entries from the slow log in chronological order.

See Also

https://redis.io/commands/slowlog-get/

This command returns the current number of entries in the slow log.

See Also

https://redis.io/commands/slowlog-len/

This command resets the slow log, clearing all entries in it.

See Also

https://redis.io/commands/slowlog-reset/

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.

See Also

https://redis.io/commands/swapdb/

The TIME command returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second.

See Also

https://redis.io/commands/time/

Implementors