pub async fn del<K>(key: K) -> Result<bool, RedisError>
where
    K: ToRedisArgs,
{
    let cm = &REDIS.get().unwrap().connect_manager;
    match redis::cmd("DEL")
        .arg(key)
        .query_async::<ConnectionManager, bool>(&mut cm.clone())
        .await
    {
        Ok(v) => Ok(v),
        Err(e) => {
            warn!("{}", e);
            Err(e)
        }
    }
}
/// Del key's value async
///
/// # Example:
///
/// ```rust
/// del<&str>("imkey").await
/// ```
Del key's value async
Del key ' s value async
pub async fn del<K>(key: K) -> Result<bool, RedisError>
where
    K: ToRedisArgs,
{
    let cm = &REDIS.get().unwrap().connect_manager;
    match redis::cmd("DEL")
        .arg(key)
        .query_async::<ConnectionManager, bool>(&mut cm.clone())
        .await
    {
        Ok(v) => Ok(v),
        Err(e) => {
            warn!("{}", e);
            Err(e)
        }
    }
}
pub async fn del < K > ( key : K ) -> Result < bool , RedisError > where K : ToRedisArgs , { let cm = & REDIS . get ( ) . unwrap ( ) . connect_manager ; match redis :: cmd ( " " ) . arg ( key ) . query_async :: < ConnectionManager , bool > ( & mut cm . clone ( ) ) . await { Ok ( v ) => Ok ( v ) , Err ( e ) => { warn ! ( " " e ) ; Err ( e ) } } }
Del key's value async
Del key ' s value async
key
K
key
K
example:
None