Trait fred::interfaces::FunctionInterface

source ·
pub trait FunctionInterface: ClientLike + Sized {
Show 14 methods // Provided methods fn fcall<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, F: Into<Str>, K: Into<MultipleKeys>, V: TryInto<MultipleValues>, V::Error: Into<RedisError> { ... } fn fcall_ro<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, F: Into<Str>, K: Into<MultipleKeys>, V: TryInto<MultipleValues>, V::Error: Into<RedisError> { ... } fn function_delete<R, S>( &self, library_name: S, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, S: Into<Str> { ... } fn function_delete_cluster<S>( &self, library_name: S, ) -> impl Future<Output = RedisResult<()>> where S: Into<Str> { ... } fn function_dump<R>(&self) -> impl Future<Output = RedisResult<R>> where R: FromRedis { ... } fn function_flush<R>( &self, async: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis { ... } fn function_flush_cluster( &self, async: bool, ) -> impl Future<Output = RedisResult<()>> { ... } fn function_kill<R>(&self) -> impl Future<Output = RedisResult<R>> where R: FromRedis { ... } fn function_list<R, S>( &self, library_name: Option<S>, withcode: bool, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, S: Into<Str> { ... } fn function_load<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, S: Into<Str> { ... } fn function_load_cluster<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, S: Into<Str> { ... } fn function_restore<R, B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<R>> where R: FromRedis, B: Into<Bytes>, P: TryInto<FnPolicy>, P::Error: Into<RedisError> { ... } fn function_restore_cluster<B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<()>> where B: Into<Bytes>, P: TryInto<FnPolicy>, P::Error: Into<RedisError> { ... } fn function_stats<R>(&self) -> impl Future<Output = RedisResult<R>> where R: FromRedis { ... }
}
Available on crate feature i-scripts only.
Expand description

Functions that implement the function interface.

Provided Methods§

source

fn fcall<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = RedisResult<R>>

source

fn fcall_ro<R, F, K, V>( &self, func: F, keys: K, args: V, ) -> impl Future<Output = RedisResult<R>>

This is a read-only variant of the FCALL command that cannot execute commands that modify data.

https://redis.io/commands/fcall_ro/

source

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

Delete a library and all its functions.

https://redis.io/commands/function-delete/

source

fn function_delete_cluster<S>( &self, library_name: S, ) -> impl Future<Output = RedisResult<()>>
where S: Into<Str>,

Delete a library and all its functions from each cluster node concurrently.

https://redis.io/commands/function-delete/

source

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

Return the serialized payload of loaded libraries.

https://redis.io/commands/function-dump/

source

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

Deletes all the libraries.

https://redis.io/commands/function-flush/

source

fn function_flush_cluster( &self, async: bool, ) -> impl Future<Output = RedisResult<()>>

Deletes all the libraries on all cluster nodes concurrently.

https://redis.io/commands/function-flush/

source

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

Kill a function that is currently executing.

Note: This command runs on a backchannel connection to the server in order to take effect as quickly as possible.

https://redis.io/commands/function-kill/

source

fn function_list<R, S>( &self, library_name: Option<S>, withcode: bool, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, S: Into<Str>,

Return information about the functions and libraries.

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

source

fn function_load<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, S: Into<Str>,

source

fn function_load_cluster<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, S: Into<Str>,

Load a library to Redis on all cluster nodes concurrently.

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

source

fn function_restore<R, B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, B: Into<Bytes>, P: TryInto<FnPolicy>, P::Error: Into<RedisError>,

Restore libraries from the serialized payload.

https://redis.io/commands/function-restore/

Note: Use FnPolicy::default() to use the default function restore policy ("APPEND").

source

fn function_restore_cluster<B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<()>>
where B: Into<Bytes>, P: TryInto<FnPolicy>, P::Error: Into<RedisError>,

Restore libraries from the serialized payload on all cluster nodes concurrently.

https://redis.io/commands/function-restore/

Note: Use FnPolicy::default() to use the default function restore policy ("APPEND").

source

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

Return information about the function that’s currently running and information about the available execution engines.

Note: This command runs on a backchannel connection to the server.

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

Object Safety§

This trait is not object safe.

Implementors§