Trait fred::interfaces::AclInterface

source ·
pub trait AclInterface: ClientLike + Sized {
    // Provided methods
    fn acl_setuser<S, V>(
        &self,
        username: S,
        rules: V,
    ) -> impl Future<Output = RedisResult<()>>
       where S: Into<Str>,
             V: TryInto<MultipleValues>,
             V::Error: Into<RedisError> { ... }
    fn acl_load(&self) -> impl Future<Output = RedisResult<()>> { ... }
    fn acl_save(&self) -> impl Future<Output = RedisResult<()>> { ... }
    fn acl_list<R>(&self) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_users<R>(&self) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_getuser<R, S>(
        &self,
        username: S,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis,
             S: Into<Str> { ... }
    fn acl_deluser<R, S>(
        &self,
        usernames: S,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis,
             S: Into<MultipleStrings> { ... }
    fn acl_cat<R>(
        &self,
        category: Option<Str>,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_genpass<R>(
        &self,
        bits: Option<u16>,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_whoami<R>(&self) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_log_count<R>(
        &self,
        count: Option<u32>,
    ) -> impl Future<Output = RedisResult<R>>
       where R: FromRedis { ... }
    fn acl_log_reset(&self) -> impl Future<Output = RedisResult<()>> { ... }
}
Available on crate feature i-acl only.
Expand description

Functions that implement the ACL interface.

Provided Methods§

source

fn acl_setuser<S, V>( &self, username: S, rules: V, ) -> impl Future<Output = RedisResult<()>>
where S: Into<Str>, V: TryInto<MultipleValues>, V::Error: Into<RedisError>,

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

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

source

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

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.

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

source

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

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.

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

source

fn acl_list<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

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

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

source

fn acl_users<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

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

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

source

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

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

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

source

fn acl_deluser<R, S>( &self, usernames: S, ) -> impl Future<Output = RedisResult<R>>

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

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

source

fn acl_cat<R>( &self, category: Option<Str>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

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.

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

source

fn acl_genpass<R>( &self, bits: Option<u16>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

Generate a password with length bits, returning the password.

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

source

fn acl_whoami<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

Return the username the current connection is authenticated with. New connections are authenticated with the “default” user.

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

source

fn acl_log_count<R>( &self, count: Option<u32>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,

Read count recent ACL security events.

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

source

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

Clear the ACL security events logs.

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

Object Safety§

This trait is not object safe.

Implementors§