Trait fred::interfaces::ConfigInterface

source ·
pub trait ConfigInterface: ClientLike + Sized {
    // Provided methods
    fn config_resetstat(&self) -> impl Future<Output = RedisResult<()>> { ... }
    fn config_rewrite(&self) -> impl Future<Output = RedisResult<()>> { ... }
    fn config_get<R, S>(
        &self,
        parameter: S,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis,
             S: Into<Str> { ... }
    fn config_set<P, V>(
        &self,
        parameter: P,
        value: V,
    ) -> impl Future<Output = RedisResult<()>>
       where P: Into<Str>,
             V: TryInto<RedisValue>,
             V::Error: Into<RedisError> { ... }
}
Available on crate feature i-config only.
Expand description

Functions that implement the config interface.

Provided Methods§

source

fn config_resetstat(&self) -> impl Future<Output = RedisResult<()>>

Resets the statistics reported by Redis using the INFO command.

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

source

fn config_rewrite(&self) -> impl Future<Output = RedisResult<()>>

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.

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

source

fn config_get<R, S>(&self, parameter: S) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, S: Into<Str>,

The CONFIG GET command is used to read the configuration parameters of a running Redis server.

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

source

fn config_set<P, V>( &self, parameter: P, value: V, ) -> impl Future<Output = RedisResult<()>>
where P: Into<Str>, V: TryInto<RedisValue>, V::Error: Into<RedisError>,

The CONFIG SET command is used in order to reconfigure the server at run time without the need to restart Redis.

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

Object Safety§

This trait is not object safe.

Implementors§