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 { ... }
}i-scripts only.Expand description
Functions that implement the function interface.
Provided Methods§
sourcefn 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<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>,
Invoke a function.
sourcefn 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 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>,
This is a read-only variant of the FCALL command that cannot execute commands that modify data.
sourcefn function_delete<R, S>(
&self,
library_name: S,
) -> impl Future<Output = RedisResult<R>>
fn function_delete<R, S>( &self, library_name: S, ) -> impl Future<Output = RedisResult<R>>
Delete a library and all its functions.
sourcefn function_delete_cluster<S>(
&self,
library_name: S,
) -> impl Future<Output = RedisResult<()>>where
S: Into<Str>,
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.
sourcefn function_dump<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn function_dump<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Return the serialized payload of loaded libraries.
sourcefn function_flush<R>(&self, async: bool) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn function_flush<R>(&self, async: bool) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Deletes all the libraries.
sourcefn function_flush_cluster(
&self,
async: bool,
) -> impl Future<Output = RedisResult<()>>
fn function_flush_cluster( &self, async: bool, ) -> impl Future<Output = RedisResult<()>>
Deletes all the libraries on all cluster nodes concurrently.
sourcefn function_kill<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
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.
sourcefn function_list<R, S>(
&self,
library_name: Option<S>,
withcode: bool,
) -> impl Future<Output = RedisResult<R>>
fn function_list<R, S>( &self, library_name: Option<S>, withcode: bool, ) -> impl Future<Output = RedisResult<R>>
Return information about the functions and libraries.
sourcefn function_load<R, S>(
&self,
replace: bool,
code: S,
) -> impl Future<Output = RedisResult<R>>
fn function_load<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>>
Load a library to Redis.
sourcefn function_load_cluster<R, S>(
&self,
replace: bool,
code: S,
) -> impl Future<Output = RedisResult<R>>
fn function_load_cluster<R, S>( &self, replace: bool, code: S, ) -> impl Future<Output = RedisResult<R>>
Load a library to Redis on all cluster nodes concurrently.
sourcefn function_restore<R, B, P>(
&self,
serialized: B,
policy: P,
) -> impl Future<Output = RedisResult<R>>
fn function_restore<R, B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<R>>
Restore libraries from the serialized payload.
https://redis.io/commands/function-restore/
Note: Use FnPolicy::default() to use the default function restore policy ("APPEND").
sourcefn function_restore_cluster<B, P>(
&self,
serialized: B,
policy: P,
) -> impl Future<Output = RedisResult<()>>
fn function_restore_cluster<B, P>( &self, serialized: B, policy: P, ) -> impl Future<Output = RedisResult<()>>
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").
sourcefn function_stats<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
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.