Struct td_rredis::ScriptInvocation
source · pub struct ScriptInvocation<'a> { /* private fields */ }
Expand description
Represents a prepared script call.
Implementations§
source§impl<'a> ScriptInvocation<'a>
impl<'a> ScriptInvocation<'a>
This type collects keys and other arguments for the script so that it
can be then invoked. While the Script
type itself holds the script,
the ScriptInvocation
holds the arguments that should be invoked until
it’s sent to the server.
sourcepub fn arg<T: ToRedisArgs>(&'a mut self, arg: T) -> &'a mut ScriptInvocation<'_>
pub fn arg<T: ToRedisArgs>(&'a mut self, arg: T) -> &'a mut ScriptInvocation<'_>
Adds a regular argument to the invocation. This ends up as ARGV[i]
in the script.
sourcepub fn key<T: ToRedisArgs>(&'a mut self, key: T) -> &'a mut ScriptInvocation<'_>
pub fn key<T: ToRedisArgs>(&'a mut self, key: T) -> &'a mut ScriptInvocation<'_>
Adds a key argument to the invocation. This ends up as KEYS[i]
in the script.