pub struct RedisClient { /* private fields */ }Implementations§
Source§impl RedisClient
impl RedisClient
Sourcepub async fn conn(&self) -> Result<RedisClientConn, Error>
pub async fn conn(&self) -> Result<RedisClientConn, Error>
Gets a connection from the pool
§Returns
Ok(RedisConnection)- A connection wrapper that works with both single and cluster modesErr(Error)- Failed to get connection from pool
pub fn with_stat_callback(&mut self, callback: &'static RedisCmdStatCallback)
Auto Trait Implementations§
impl Freeze for RedisClient
impl !RefUnwindSafe for RedisClient
impl Send for RedisClient
impl Sync for RedisClient
impl Unpin for RedisClient
impl !UnwindSafe for RedisClient
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