pub struct RedisPool(pub Pool<Manager>);Tuple Fields§
§0: Pool<Manager>Implementations§
Source§impl RedisPool
impl RedisPool
pub fn init(uri: &str, db_name: &str) -> Result<Self>
pub async fn instance(&self) -> Result<Object<Manager>>
Sourcepub async fn set_ex<K, V>(&self, key: K, value: V, ex: u32) -> Result<()>
pub async fn set_ex<K, V>(&self, key: K, value: V, ex: u32) -> Result<()>
SET key value EX seconds
Sourcepub async fn hset<K, V>(&self, table: &str, key: K, value: V) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
pub async fn hset<K, V>(&self, table: &str, key: K, value: V) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
HSET table key value
Sourcepub async fn hmset<K, V>(&self, table: &str, pairs: &[(K, V)]) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
pub async fn hmset<K, V>(&self, table: &str, pairs: &[(K, V)]) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
HSET table key2 value2 key2 value2
Sourcepub async fn hset_ex<K, V>(
&self,
table: &str,
key: K,
value: V,
ex: u32,
) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
pub async fn hset_ex<K, V>(
&self,
table: &str,
key: K,
value: V,
ex: u32,
) -> Result<()>where
K: ToRedisArgs,
V: ToRedisArgs,
HSET table key value EX seconds
Sourcepub async fn hget<K, V>(&self, table: &str, key: K) -> Result<Option<V>>where
K: ToRedisArgs,
V: FromRedisValue,
pub async fn hget<K, V>(&self, table: &str, key: K) -> Result<Option<V>>where
K: ToRedisArgs,
V: FromRedisValue,
HGET table key
Sourcepub async fn hmget<K, V>(&self, table: &str, keys: &[K]) -> Result<Vec<V>>where
K: ToRedisArgs,
V: FromRedisValue,
pub async fn hmget<K, V>(&self, table: &str, keys: &[K]) -> Result<Vec<V>>where
K: ToRedisArgs,
V: FromRedisValue,
HMGET table key1 key2 key3
Sourcepub async fn hget_all<K, V>(&self, table: &str) -> Result<Vec<(K, V)>>where
K: FromRedisValue,
V: FromRedisValue,
pub async fn hget_all<K, V>(&self, table: &str) -> Result<Vec<(K, V)>>where
K: FromRedisValue,
V: FromRedisValue,
HGETALL table
Sourcepub async fn hdel<K>(&self, table: &str, key: K) -> Result<()>where
K: ToRedisArgs,
pub async fn hdel<K>(&self, table: &str, key: K) -> Result<()>where
K: ToRedisArgs,
HDEL table key
Sourcepub async fn hmdel<K>(&self, table: &str, keys: &[K]) -> Result<()>where
K: ToRedisArgs,
pub async fn hmdel<K>(&self, table: &str, keys: &[K]) -> Result<()>where
K: ToRedisArgs,
HDEL table key1 key2 key3
pub async fn publish<C, M>(&self, channel: C, message: M) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for RedisPool
impl !UnwindSafe for RedisPool
impl Freeze for RedisPool
impl Send for RedisPool
impl Sync for RedisPool
impl Unpin for RedisPool
impl UnsafeUnpin for RedisPool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more