Expand description
Lua script helper (Script): SHA-caching EVALSHA with EVAL fallback.
use glide::Script;
let script = Script::new("return tonumber(ARGV[1]) + tonumber(ARGV[2])");
let sum: i64 = script.arg(1).arg(2).invoke_async(&mut client).await?;
assert_eq!(sum, 3);Async methods take an async GLIDE client (crate::GlideClient or
crate::GlideClusterClient); blocking methods take a sync GLIDE client
(crate::sync::SyncGlideClient or crate::sync::SyncGlideClusterClient).
Structs§
- Script
- A cached Lua script with its SHA-1 hash.
- Script
Invocation - A pending script invocation: keys + args bound to a
Script.