Trait ScriptingCommands

Source
pub trait ScriptingCommands<'a> {
Show 19 methods // Provided methods fn eval<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn eval_readonly<R>( self, builder: CallBuilder, ) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn evalsha<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn evalsha_readonly<R>( self, builder: CallBuilder, ) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn fcall<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn fcall_readonly<R>( self, builder: CallBuilder, ) -> PreparedCommand<'a, Self, R> where Self: Sized, R: Response { ... } fn function_delete<L>( self, library_name: L, ) -> PreparedCommand<'a, Self, ()> where Self: Sized, L: SingleArg { ... } fn function_dump(self) -> PreparedCommand<'a, Self, FunctionDumpResult> where Self: Sized { ... } fn function_flush( self, flushing_mode: FlushingMode, ) -> PreparedCommand<'a, Self, ()> where Self: Sized { ... } fn function_kill(self) -> PreparedCommand<'a, Self, ()> where Self: Sized { ... } fn function_list( self, options: FunctionListOptions, ) -> PreparedCommand<'a, Self, Vec<LibraryInfo>> where Self: Sized { ... } fn function_load<F, L>( self, replace: bool, function_code: F, ) -> PreparedCommand<'a, Self, L> where Self: Sized, F: SingleArg, L: PrimitiveResponse { ... } fn function_restore<P>( self, serialized_payload: P, policy: FunctionRestorePolicy, ) -> PreparedCommand<'a, Self, ()> where Self: Sized, P: SingleArg { ... } fn function_stats(self) -> PreparedCommand<'a, Self, FunctionStats> where Self: Sized { ... } fn script_debug( self, debug_mode: ScriptDebugMode, ) -> PreparedCommand<'a, Self, ()> where Self: Sized { ... } fn script_exists<S, C>( self, sha1s: C, ) -> PreparedCommand<'a, Self, Vec<bool>> where Self: Sized, S: SingleArg, C: SingleArgCollection<S> { ... } fn script_flush( self, flushing_mode: FlushingMode, ) -> PreparedCommand<'a, Self, ()> where Self: Sized { ... } fn script_kill(self) -> PreparedCommand<'a, Self, ()> where Self: Sized { ... } fn script_load<S, V>(self, script: S) -> PreparedCommand<'a, Self, V> where Self: Sized, S: SingleArg, V: PrimitiveResponse { ... }
}
Expand description

A group of Redis commands related to Scripting and Functions

§See Also

Redis Scripting and Functions Commands Scripting with LUA Functions

Provided Methods§

Source

fn eval<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

Invoke the execution of a server-side Lua script.

§Return

The return value of the script

§See Also

https://redis.io/commands/eval/

Source

fn eval_readonly<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

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

§Return

The return value of the script

§See Also

https://redis.io/commands/eval_ro/

Source

fn evalsha<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

Evaluate a script from the server’s cache by its SHA1 digest.

§Return

The return value of the script

§See Also

https://redis.io/commands/eval/

Source

fn evalsha_readonly<R>( self, builder: CallBuilder, ) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

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

§Return

The return value of the script

§See Also

https://redis.io/commands/evalsha_ro/

Source

fn fcall<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

Invoke a function.

§Return

The return value of the function

§See Also

https://redis.io/commands/fcall/

Source

fn fcall_readonly<R>(self, builder: CallBuilder) -> PreparedCommand<'a, Self, R>
where Self: Sized, R: Response,

Invoke a function.

§Return

The return value of the function

§See Also

https://redis.io/commands/fcall-ro/

Source

fn function_delete<L>(self, library_name: L) -> PreparedCommand<'a, Self, ()>
where Self: Sized, L: SingleArg,

Delete a library and all its functions.

§See Also

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

Source

fn function_dump(self) -> PreparedCommand<'a, Self, FunctionDumpResult>
where Self: Sized,

Return the serialized payload of loaded libraries. You can restore the serialized payload later with the function_restore command.

§Return

The serialized payload

§See Also

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

Source

fn function_flush( self, flushing_mode: FlushingMode, ) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Deletes all the libraries.

§See Also

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

Source

fn function_kill(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Kill a function that is currently executing.

§See Also

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

Source

fn function_list( self, options: FunctionListOptions, ) -> PreparedCommand<'a, Self, Vec<LibraryInfo>>
where Self: Sized,

Return information about the functions and libraries.

§See Also

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

Source

fn function_load<F, L>( self, replace: bool, function_code: F, ) -> PreparedCommand<'a, Self, L>
where Self: Sized, F: SingleArg, L: PrimitiveResponse,

Load a library to Redis.

§Return

The library name that was loaded

§See Also

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

Source

fn function_restore<P>( self, serialized_payload: P, policy: FunctionRestorePolicy, ) -> PreparedCommand<'a, Self, ()>
where Self: Sized, P: SingleArg,

Restore libraries from the serialized payload.

§See Also

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

Source

fn function_stats(self) -> PreparedCommand<'a, Self, FunctionStats>
where Self: Sized,

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

§See Also

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

Source

fn script_debug( self, debug_mode: ScriptDebugMode, ) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Set the debug mode for subsequent scripts executed with EVAL.

§See Also

https://redis.io/commands/script-debug/

Source

fn script_exists<S, C>(self, sha1s: C) -> PreparedCommand<'a, Self, Vec<bool>>
where Self: Sized, S: SingleArg, C: SingleArgCollection<S>,

Returns information about the existence of the scripts in the script cache.

§Return

The SHA1 digest of the script added into the script cache.

§See Also

https://redis.io/commands/script-exists/

Source

fn script_flush( self, flushing_mode: FlushingMode, ) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Flush the Lua scripts cache.

§See Also

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

Source

fn script_kill(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Kills the currently executing EVAL script, assuming no write operation was yet performed by the script.

§See Also

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

Source

fn script_load<S, V>(self, script: S) -> PreparedCommand<'a, Self, V>
where Self: Sized, S: SingleArg, V: PrimitiveResponse,

Load a script into the scripts cache, without executing it.

§Return

The SHA1 digest of the script added into the script cache.

§See Also

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

Implementors§

Source§

impl<'a> ScriptingCommands<'a> for &'a Client

Source§

impl<'a> ScriptingCommands<'a> for &'a mut Transaction

Source§

impl<'a, 'b> ScriptingCommands<'a> for &'a mut Pipeline<'b>