pub trait CustomCommand: CommandExecutor {
// Provided methods
fn custom_command<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>
where A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn custom_command_with_route<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
route: Route,
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>
where A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Convenience helpers layered on top of CommandExecutor, available on every
client. These are the “escape hatches” that guarantee 100% functional command
coverage regardless of which typed wrappers exist.
Provided Methods§
Sourcefn custom_command<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>where
A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn custom_command<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>where
A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute an arbitrary command given its already-encoded arguments, e.g.
client.custom_command(&["SET", "key", "value"]).await.
The first argument is the command keyword; the rest are its arguments.
Sourcefn custom_command_with_route<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
route: Route,
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>where
A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn custom_command_with_route<'life0, 'life1, 'async_trait, A>(
&'life0 self,
args: &'life1 [A],
route: Route,
) -> Pin<Box<dyn Future<Output = ValkeyResult<ValkeyValue>> + Send + 'async_trait>>where
A: ToValkeyArgs + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Like CustomCommand::custom_command but routed (cluster). Ignored for
standalone clients.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".