pub type Hook = Hook<Manager>;👎Deprecated since 0.1.1: The functionality of
redis_cluster_async has been merged into the
redis crate rendering this crate obsolete. Please use deadpool-redis instead.Expand description
Type alias for using deadpool::managed::Hook with [redis_cluster].
Aliased Type§
pub enum Hook {
Fn(Box<dyn Fn(&mut Connection, &Metrics) -> Result<(), HookError<RedisError>> + Sync + Send>),
AsyncFn(Box<dyn for<'a> Fn(&'a mut Connection, &'a Metrics) -> Pin<Box<dyn Future<Output = Result<(), HookError<RedisError>>> + Send + 'a>> + Sync + Send>),
}Variants§
Fn(Box<dyn Fn(&mut Connection, &Metrics) -> Result<(), HookError<RedisError>> + Sync + Send>)
Use a plain function (non-async) as a hook
AsyncFn(Box<dyn for<'a> Fn(&'a mut Connection, &'a Metrics) -> Pin<Box<dyn Future<Output = Result<(), HookError<RedisError>>> + Send + 'a>> + Sync + Send>)
Use an async function as a hook